{"id":300,"date":"2018-07-23T12:23:41","date_gmt":"2018-07-23T11:23:41","guid":{"rendered":"https:\/\/blog.van-daag.nl\/?p=300"},"modified":"2020-01-14T13:18:09","modified_gmt":"2020-01-14T12:18:09","slug":"raspberry-pi-as-a-vpn-client-to-fritzbox-with-ipsec","status":"publish","type":"post","link":"https:\/\/van-daag.nl\/?p=300","title":{"rendered":"Raspberry PI as a VPN Client to FRITZBOX with IPSEC"},"content":{"rendered":"<h6>Setup of VPN at the Fritzbox<\/h6>\n<p>First, a new user is created under System-&gt; FRITZ! Box user.<\/p>\n<p>Here, the access from the Internet must be granted and VPN (of course, be unlocked, everything else is deselected.<\/p>\n<p>we remember the information from the iphone settings:<\/p>\n<blockquote>\n<ul class=\"no_points\">\n<li><span class=\"desc\">Description:<\/span><\/li>\n<li><span class=\"desc\">Server:<\/span>\u00a0arpdggefuegr23723n.myfritz.net<\/li>\n<li><span class=\"desc\">Account:<\/span>\u00a0vpn_user<\/li>\n<li><span class=\"desc\">Password:<\/span>\u00a0Password of the FRITZ! Box user &#8220;vpn_user&#8221;<\/li>\n<li>Use certificate is disabled<\/li>\n<li><span class=\"desc\">Group name:<\/span>\u00a0vpn_user<\/li>\n<li><span class=\"desc\">Shared Secret:\u00a0<\/span><span class=\"courier\">TANrpS1y34hHHJGIS4<\/span><\/li>\n<\/ul>\n<\/blockquote>\n<h6>\u00a0Now it goes on the\u00a0Raspi\u00a0&#8230;.<\/h6>\n<p>Installation:<\/p>\n<blockquote><p><code id=\"552b694916037\">sudo apt-get install vpnc<\/code><\/p><\/blockquote>\n<p>Create and customize config:<\/p>\n<blockquote><p><code id=\"552b694918741\">sudo nano \/etc\/vpnc\/fritzbox.conf<\/code><\/p>\n<p><code id=\"552b694972c93\">IPSec gateway arpdggefuegr23723n.myfritz.net<br \/>\nIPSec ID vpn_user<br \/>\nIPSec secret\u00a0<span class=\"courier\">TANrpS1y34hHHJGIS4<\/span><br \/>\nIKE Authmode psk<br \/>\nXauth username vpn_user<br \/>\nXauth password &lt;passwort&gt;<br \/>\nlocal port 0<br \/>\nDPD idle timeout (our side) 0<\/code><\/p><\/blockquote>\n<p>first test of the tunnel:<\/p>\n<blockquote><p><code id=\"552b69491d55b\">sudo vpnc fritzbox.conf<\/code><\/p><\/blockquote>\n<p>Ending the VPn connection:<\/p>\n<blockquote><p><code id=\"552b69491fc77\">sudo vpnc-disconnect<\/code><\/p><\/blockquote>\n<p>I have the start of the script in\u00a0<em>\/etc\/rc.local<\/em>\u00a0registered so that the VPN connection is established during boot.<\/p>\n<blockquote><p><code id=\"552b69491d55b\">vpnc fritzbox.conf<\/code><\/p><\/blockquote>\n<p>&#8211; Update &#8211;<\/p>\n<p>Since the VPN connection breaks partially uncontrolled Abdelkader Wahb has made a script that monitors the connection and reboots when needed.\u00a0I do not want to deprive you of this:<\/p>\n<blockquote><\/blockquote>\n<p>Entry in \/ etc \/ crontab so that every 3 minutes is automatically executed on boot:<\/p>\n<blockquote><p>* \/ 3 * * * * root \/etc\/init.d\/autovpncscript<\/p><\/blockquote>\n<p>Source:<a href=\"http:\/\/www.kuemmel.wtf\/?p=363\">\u00a0kuemmel.wtf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setup of VPN at the Fritzbox First, a new user is created under System-&gt; FRITZ! Box user. Here, the access from the Internet must be granted and VPN (of course, be unlocked, everything else is deselected. we remember the information from the iphone settings: Description: Server:\u00a0arpdggefuegr23723n.myfritz.net Account:\u00a0vpn_user Password:\u00a0Password of the FRITZ! Box user &#8220;vpn_user&#8221; Use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[32,13,31],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-fritzbox","category-raspberry","category-vpn"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300"}],"version-history":[{"count":3,"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/van-daag.nl\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/van-daag.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}