Translate

Saturday, July 14, 2018

VPN - troubleshooting

Some tips to solve problems related to the Raspberry Pi VPN.



VPN connect but no internet


VPN is working, can connect with client, but no data are passing thru

 Check some basic settings first
  • /etc/sysctl.confEdit the file and verify that the line net.ipv4.ip_forward=1 is uncommented and thus present.
    Force activation anyway after editing with : sudo sysctl -p
  • /etc/firewall-openvpn-rules.sh
    • Edit the file and verify that contains the line below :
      iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
    • Force correct ownership and permission on the file
      sudo chmod 700 /etc/firewall-openvpn-rules.sh
      sudo chown root /etc/firewall-openvpn-rules.sh
    • Force the call to the firewall-openvpn-rules.sh script in bashrc to be sure is called at boot.
      Edit : ~/.bashrc and add the call to the firewall-openvpn-rules.sh with sudo
  • Run raspi-config and select the boot option to wait for network at the bootstrap time
  • If still the VPN is not working after a bootstrap, try manually restart the openvpn.
    sudo service openvpn restart

No comments:

Post a Comment