{"id":651,"date":"2013-04-03T05:29:32","date_gmt":"2013-04-03T03:29:32","guid":{"rendered":"http:\/\/blog.philippgoecke.de\/?p=651"},"modified":"2013-09-09T20:19:15","modified_gmt":"2013-09-09T18:19:15","slug":"static-ip-tinc-vpn-on-debian-wheezy","status":"publish","type":"post","link":"https:\/\/stls.eu\/blog\/2013\/04\/03\/static-ip-tinc-vpn-on-debian-wheezy\/","title":{"rendered":"Static IP Tinc VPN on Debian Wheezy"},"content":{"rendered":"<p>Install tinc<\/p>\n<pre>aptitude install tinc<\/pre>\n<p>tinc client create script<\/p>\n<pre>#!\/bin\/bash\r\n#\r\nVersion=\"0.0.8\"\r\n#\r\n# automated Tinc configuration of one participant of a static IP VPN ############################################\r\necho \"tinc config configurator\"\r\n\r\nVPNName=\"yourtincvpnname123\"\t\t# Once set stays the same\r\nVPNSubnet=\"10.9.8.0\/24\"\t\t\t# Once set stays the same\r\nServerName=\"Server0123\"\t\t\t# Name of one or more Clients (space separated)\r\nThisClientName=\"Client0123\"\t\t# Each Client must have a unique Name (Server is created the same way as every other Client)\r\nThisClientAddress=\"name.dyndns.tld\"\t# DNS or IP of this Client\r\nThisClientPort=\"655\"\t\t\t# Port of this Client\r\nThisClientUniqueVpnIp=\"10.9.8.123\"\t# Each Client must have a unique static IP\r\n\r\n# make needed directories\r\necho \"creating directories ...\"\r\nmkdir -v \"\/etc\/tinc\/$VPNName\/\"\r\nmkdir -v \"\/etc\/tinc\/$VPNName\/hosts\/\"\r\ntouch \"\/etc\/tinc\/$VPNName\/hosts\/tinc.conf\"\r\n\r\necho \"creating tinc config ...\"\r\necho \"Name = $ThisClientName\r\nConnectTo = $ServerName\r\nDevice = \/dev\/net\/tun\r\nInterface = VPN\r\nDeviceType = tap\r\nMode = switch\" > \"\/etc\/tinc\/$VPNName\/tinc.conf\"\r\n#Device = \/dev\/net\/tun \/\/ for Linux\r\n#Interface = VPN       \/\/ for Windows\r\n\r\ncat \"\/etc\/tinc\/$VPNName\/tinc.conf\"\r\nchmod 640 \"\/etc\/tinc\/$VPNName\/tinc.conf\"\r\n\r\necho \"creating tinc client file\"\r\necho \"Address = $ThisClientAddress\r\nSubnet = $VPNSubnet\r\nPort = $ThisClientPort\" > \"\/etc\/tinc\/$VPNName\/hosts\/$ThisClientName\"\r\n#Subnet = $VPNSubnet   \/\/ virtual subnet\r\n\r\necho \"creating ip config file\"\r\necho \"#!\/bin\/sh\r\nifconfig \\$INTERFACE $ThisClientUniqueVpnIp netmask 255.255.0.0\" > \"\/etc\/tinc\/$VPNName\/tinc-up\"\r\nchmod +x \"\/etc\/tinc\/$VPNName\/tinc-up\"\r\n\r\n# Auto activate This VPN\r\necho \"activating this vpn\"\r\ncat \/etc\/tinc\/nets.boot\r\necho \"$VPNName\" >> \/etc\/tinc\/nets.boot\r\ncat \/etc\/tinc\/nets.boot\r\n\r\n# generate vpn keys\r\necho \"generating public and private vpn keys\"\r\n# tincd -n \"$VPNName\" -K[=BITS]\r\ntincd -n \"$VPNName\" -K4096\r\n\r\n#############!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1\r\necho \"Exchange all hosts files (can be done over insecure connections without security flaws)\"\r\n#############!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1\r\necho \"Debuging:\"\r\necho 'tincd -n \"$VPNName\" -D -d'<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Install tinc aptitude install tinc tinc client create script #!\/bin\/bash # Version=&#8221;0.0.8&#8243; # # automated Tinc configuration of one participant of a static IP VPN ############################################ echo &#8220;tinc config configurator&#8221; VPNName=&#8221;yourtincvpnname123&#8243; # Once set stays the same VPNSubnet=&#8221;10.9.8.0\/24&#8243; # Once &hellip; <a href=\"https:\/\/stls.eu\/blog\/2013\/04\/03\/static-ip-tinc-vpn-on-debian-wheezy\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,4,22],"tags":[],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-vpn"],"_links":{"self":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":18,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":796,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions\/796"}],"wp:attachment":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}