{"id":559,"date":"2014-04-08T07:41:03","date_gmt":"2014-04-08T12:41:03","guid":{"rendered":"http:\/\/otac.isa-geek.net\/blog\/?p=559"},"modified":"2014-12-04T08:04:31","modified_gmt":"2014-12-04T13:04:31","slug":"home-vpn-connectivity","status":"publish","type":"post","link":"https:\/\/otac.isa-geek.net\/blog\/?p=559","title":{"rendered":"Home VPN connectivity"},"content":{"rendered":"<p><span style=\"line-height: 1.5em;\">I&#8217;ve wanted to set up VPN capability \u00a0to my home network for a while now, in order to gain the benefits of improved security and local network access while working remotely. After a bit of research and some tweaking, I eventually got it working using the following steps.<\/span><\/p>\n<p>The type of VPN I chose to use is based on PPTP, rather than the more complex IPSec or L2TP. My primary rationale: I wanted to finish by dinner. Keep in mind, that with the easier implementation of PPTP, one does give up some increased sense of security from the trusted certificate usage and end-end encryption found in IPSEc and L2TP.<\/p>\n<p>Commands:<\/p>\n<p><strong>$ sudo aptitude install pptpd<\/strong><\/p>\n<p><strong>$ sudo vi \/etc\/pptpd.conf<\/strong><br \/>\n#Settings for Otac network &#8211; DCato 1\/04\/14<br \/>\nlocalip 192.168.2.12<br \/>\nremoteip 192.168.2.234-238,192.168.2.245<\/p>\n<p><strong>$ sudo vi \/etc\/ppp\/pptpd-options<\/strong><br \/>\n#Settings for Otac network &#8211; DCato 1\/4\/14<br \/>\nms-dns 192.168.2.1<\/p>\n<p>nobsdcomp<\/p>\n<p>noipx<\/p>\n<p>mtu 1490<\/p>\n<p>mru 1490<\/p>\n<p><strong>sudo vi \/etc\/ppp\/chap-secrets<\/strong><br \/>\n# client server secret IP addresses<br \/>\nusername * secret-password *<\/p>\n<p>Finally, you can reboot the pptpd server with:<br \/>\n<strong>$ sudo \/etc\/init.d\/pptpd restart<\/strong><\/p>\n<p>Edit \/etc\/sysctl.conf<br \/>\nUn-comment the following line in &#8220;\/etc\/sysctl.conf&#8221;:<br \/>\nnet.ipv4.ip_forward=1<\/p>\n<p>The following command reloads the configuration (you can also just reboot at the end of this guide):<br \/>\n<strong>$ sudo sysctl -p<\/strong><\/p>\n<p>Open the port on the server:<\/p>\n<p><strong>$ sudo ufw allow 1723<\/strong><\/p>\n<p>Edit \/etc\/default\/ufw<br \/>\nEdit &#8220;\/etc\/default\/ufw&#8221; and change the option &#8220;DEFAULT_FORWARD_POLICY&#8221; from &#8220;DROP&#8221; to &#8220;ACCEPT&#8221;<\/p>\n<p>Edit \/etc\/ufw\/before.rules<br \/>\nAdd the following either at the beginning of &#8220;\/etc\/ufw\/before.rules&#8221; or just before the *filter rules (recommended):<br \/>\n# NAT table rules<br \/>\n*nat<\/p>\n<p>:POSTROUTING ACCEPT [0:0]<br \/>\n# Allow forward traffic to eth0<br \/>\n-A POSTROUTING -s 10.99.99.0\/24 -o eth0 -j MASQUERADE<\/p>\n<p># Process the NAT table rules<br \/>\nCOMMIT<\/p>\n<p>At this point, you can reset and restart the local firewall:<\/p>\n<p><strong>$ sudo ufw disable &amp;&amp; sudo ufw enable<\/strong><\/p>\n<p>Remember to open up your NAT fireweall as well. This may involve setting up appropriate port forwarding or a DMZ to ensure you can get through to the pptp server on port 1723.<\/p>\n<p>Finally, connecting. On the client side, settings are pretty straight forward &#8211; here&#8217;s my Android client:<\/p>\n<p><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-19-56.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-628\" alt=\"Screenshot_2014-12-04-07-19-56\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-19-56-150x150.png\" width=\"150\" height=\"150\" srcset=\"https:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-19-56-150x150.png 150w, https:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-19-56-144x144.png 144w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-627\" style=\"line-height: 1.5em;\" alt=\"Screenshot_2014-12-04-07-22-08\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-22-08-150x150.png\" width=\"150\" height=\"150\" srcset=\"https:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-22-08-150x150.png 150w, https:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2014\/12\/Screenshot_2014-12-04-07-22-08-144x144.png 144w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/p>\n<p>Similar settings would apply for connecting from Windows or other operating systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve wanted to set up VPN capability \u00a0to my home network for a while now, in order to gain the benefits of improved security and local network access while working remotely. After a bit of research and some tweaking, I eventually got it working using the following steps. The type of VPN I chose to [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,75,44],"tags":[73],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-linux","category-pptp","category-ubuntu","tag-vpn-pptp-linux-ubuntu-windows"],"_links":{"self":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=559"}],"version-history":[{"count":9,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":629,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions\/629"}],"wp:attachment":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}