I just set up a FreeBSD vps to use as a vpn server and everything seemed great until I tried to pass traffic. the vpn connects fine and assigns my client an ip but I think there is an issue with the routes as I can only ping the client side of the tunnel and not the remote. Both sides run FreeBSD 10.2, the client connects through pppoe to the internet.
server.conf:
port 1194
proto udp
dev tun
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/ANCHOR.crt
key /usr/local/etc/openvpn/keys/ANCHOR.key # This file should be kept secret
dh /usr/local/etc/openvpn/keys/dh2048.pem
server 10.8.0.0 255.255.255.0
push "route 10.0.0.0 255.255.255.0"
push "route 192.168.20.0 255.255.255.0"
push "redirect-gateway" # def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
persist-key
persist-tun
comp-lzo
keepalive 10 120
user nobody
group nobody
keepalive 10 120
;cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
comp-lzo
status openvpn-status.log
verb 3
mute 20
client.ovpn:
client
remote-cert-tls server
dev tun
proto udp
remote XXX.XXX.XXX.XXX 1194
nobind
persist-key
persist-tun
ca ca.crt
cert GEN5.crt
key GEN5.key
comp-lzo
verb 3
I don't know if it matters but my client network lives in the 10.0.0.0/24 and I am trying to push all traffic through the VPN.
Here are routing tables from both sides while connected:
SERVER:
Internet:
Destination Gateway Flags Netif Expire
default 192.184.95.1 UGS em0
10.8.0.0/24 10.8.0.2 UGS tun0
10.8.0.1 link#3 UHS lo0
10.8.0.2 link#3 UH tun0
127.0.0.1 link#2 UH lo0
192.184.95.0/24 link#1 U em0
XXX.XXX.XXX.XXX link#1 UHS lo0
CLIENT:
Internet:
Destination Gateway Flags Netif Expire
default 10.8.0.5 UGS tun1
10.0.0.0/24 link#2 U bge1
10.0.0.1 link#2 UHS lo0
10.8.0.1/32 10.8.0.5 UGS tun1
10.8.0.5 link#6 UH tun1
10.8.0.6 link#6 UHS lo0
127.0.0.1 link#4 UH lo0
133.130.171.207 link#5 UHS lo0
192.168.20.0/24 10.8.0.5 UGS tun1
XXX.XXX.XXX.XXX/32 133.130.171.207 UGS tun0
210.165.243.185 link#5 UHS tun0
I'm not sure that I understand how route works yet...