OpenVPN on Raspberry Pi 3

Written by pmd - - no comments

Know your IP address:

curl ifconfig.me/ip

Install OpenVPN:

sudo apt-get install openvpn

Know your route before OpenVPN is connected:

route

Copy all necessary conf files in:

/etc/openvpn

Interesting settings:

script-security 2
route-noexec
block-outside-dns
up /etc/openvpn/up.sh
down /etc/openvpn/down.sh

Start openvpn from command line to test if tun0 mounts:

sudo openvpn --config /etc/openvpn/server.conf
ifconfig

To connect to VPN at startup, put conf file in /etc/openvpn. Example: openvpn will connect at startup to VPN1 and VPN2:

/etc/openvpn/vpn1.conf
/etc/openvpn/vpn2.conf

Comments are closed.