Makaveli6103
Contributor
- Joined
- Mar 18, 2012
- Messages
- 104
I setup OpenVPN on my FreeNAS box and am able to connect to it successfully. But I want to route all of my data through the VPN and it will not do that. When I connect the VPN the internet stops working but I can still connect to my FreeNAS box. I added gateway_enable="YES" to my rc.conf to and net.inet.ip.forwarding to my sysctl to allow IP forwarding...but that didnt work either. Below are my the tables and conf files for the vpn
Server table
Client table before connection
Client After
Server conf file
client conf file
Server table
Code:
Destination Gateway Flags Refs Use Netif Expire default 192.168.1.1 UGS 0 547 em0 10.8.0.0/24 10.8.0.2 UGS 0 12 tun0 10.8.0.1 link#12 UHS 0 0 lo0 10.8.0.2 link#12 UH 0 0 tun0 127.0.0.1 link#11 UH 0 221 lo0 192.168.1.0/24 link#7 U 0 1765 em0 192.168.1.8 link#7 UHS 0 11 lo0
Client table before connection
Code:
Destination Gateway Flags Refs Use Netif Expire default 192.168.1.1 UGSc 38 0 en0 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 10 23214 lo0 169.254 link#4 UCS 0 0 en0 192.168.1 link#4 UCS 5 0 en0
Client After
Code:
Destination Gateway Flags Refs Use Netif Expire default 10.8.0.5 UGSc 5 0 tun0 10.8.0.1/32 10.8.0.5 UGSc 0 0 tun0 10.8.0.5 10.8.0.6 UHr 6 12 tun0 Ext IP/32 192.168.1.1 UGSc 1 0 en0 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 11 22948 lo0 169.254 link#4 UCS 0 0 en0 192.168.1 link#4 UCS 9 0 en0
Server conf file
Code:
local 192.168.1.8 port 1194 proto udp dev tun ca /mnt/tank/openvpn/keys/ca.crt cert /mnt/tank/openvpn/keys/server.crt key /mnt/tank/openvpn/keys/server.key dh /mnt/tank/openvpn/keys/dh1024.pem server 10.8.0.0 255.255.255.0 push "route 192.168.1.0 255.255.255.0" status /mnt/tank/openvpn/status.log log /mnt/tank/openvpn/openvpn.log log-append /mnt/tank/openvpn/openvpn.log ifconfig-pool-persist ipp.txt keepalive 10 120 push "redirect-gateway bypass-dhcp" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" comp-lzo persist-key persist-tun verb 4
client conf file
Code:
remote "ext ip 1194 udp pull tls-client ns-cert-type server persist-key ca ca.crt dev tun persist-tun cert cert.crt comp-lzo yes nobind key key.key resolv-retry infinite