I implemented OpenVPN server on Ubuntu 16.04 LTS and OpenVPN client on Windows 10.
With both UFW and Windows firewall enabled, I can connect to the server as determined by
systemctl status openvpn@server
the OpenVPN GUI. Without
redirect-gateway def1
in the client-side config, the vpn connection is established but the public IP does not change. When I add that code, traffic is definitely being directed to the server because I can ssh/ping the server using the local IP address (196.168.x.x) instead of the public ISP IP address...but except for communication with the server, no other traffic gets through (i.e. I cannot ping an IP address e.g. 4.4.4.4 or check my IP address via a website). I assume, but do not know for sure, if I can get to other local machines inside the network with local IPs, e.g. my router.
Here is the client config:
client
remote ###.###.###.###
port 1194
proto udp
dev tun
dev-type tun
#ns-cert-type server
remote-cert-tls server
reneg-sec 86400
#auth-user-pass
#auth-retry interact
comp-lzo yes
verb 3
ca "C:\\Users\\NAME\\Documents\\openvpn\\ca.crt"
cert "C:\\Users\\NAME\\Documents\\openvpn\\bvargo.crt"
key "C:\\Users\\NAME\\Documents\\openvpn\\bvargo.key"
#management 127.0.0.1 1194
#management-hold
#management-query-passwords
auth-retry interact
; Set the name of the Windows TAP network interface device here
dev-node "Ethernet 2"
#dev-node MyTAP
#dev-node "TAP-Windows Adapter V9"
#dev-node "Teredo Tunneling Pseudo-Interface"
redirect-gateway def1
The server.conf is quite a bit longer so I am not sure where to start with that or any other logs, etc.
I am basically trying to route traffic through the active VPN to my home connection when I am using a public connection on my laptop and phone.
Thank you.