{"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":"
First, a new user is created under System-> FRITZ! Box user.<\/p>\n
Here, the access from the Internet must be granted and VPN (of course, be unlocked, everything else is deselected.<\/p>\n
we remember the information from the iphone settings:<\/p>\n
\n\n
- Description:<\/span><\/li>\n
- Server:<\/span>\u00a0arpdggefuegr23723n.myfritz.net<\/li>\n
- Account:<\/span>\u00a0vpn_user<\/li>\n
- Password:<\/span>\u00a0Password of the FRITZ! Box user “vpn_user”<\/li>\n
- Use certificate is disabled<\/li>\n
- Group name:<\/span>\u00a0vpn_user<\/li>\n
- Shared Secret:\u00a0<\/span>TANrpS1y34hHHJGIS4<\/span><\/li>\n<\/ul>\n<\/blockquote>\n
\u00a0Now it goes on the\u00a0Raspi\u00a0….<\/h6>\n
Installation:<\/p>\n
sudo apt-get install vpnc<\/code><\/p><\/blockquote>\nCreate and customize config:<\/p>\n
sudo nano \/etc\/vpnc\/fritzbox.conf<\/code><\/p>\n
IPSec gateway arpdggefuegr23723n.myfritz.net
\nIPSec ID vpn_user
\nIPSec secret\u00a0TANrpS1y34hHHJGIS4<\/span>
\nIKE Authmode psk
\nXauth username vpn_user
\nXauth password <passwort>
\nlocal port 0
\nDPD idle timeout (our side) 0<\/code><\/p><\/blockquote>\nfirst test of the tunnel:<\/p>\n
sudo vpnc fritzbox.conf<\/code><\/p><\/blockquote>\nEnding the VPn connection:<\/p>\n
sudo vpnc-disconnect<\/code><\/p><\/blockquote>\nI have the start of the script in\u00a0\/etc\/rc.local<\/em>\u00a0registered so that the VPN connection is established during boot.<\/p>\n
vpnc fritzbox.conf<\/code><\/p><\/blockquote>\n– Update –<\/p>\n
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>\nEntry in \/ etc \/ crontab so that every 3 minutes is automatically executed on boot:<\/p>\n
* \/ 3 * * * * root \/etc\/init.d\/autovpncscript<\/p><\/blockquote>\n