First of all, I know this question has been asked at least a million times. I have tried many solutions and still can't get my VPN to work. When I connect to my VPN my client IP changes to the VPN IP (expected). But won't route all traffic through the VPN. I can tell because I use OpenDNS as my home DNS server and use their
internetbadguys.com test domain to test traffic through the VPN.
I am using the
push flags in server.conf:
push "redirect-gateway def1" push "remote-gateway vpn_server_ip" push "dhcp-option DNS 184.108.40.206" keepalive 10 60
and in client.ovpn:
push "redirect-gateway def1"
Also, if it helps, I am using an AWS EC2 instance to run my VPN. I'm not sure what else to do next. Hopefully, someone can figure this out :)
Thanks in advance!
Server and Client configs below:
port PORT proto udp dev tun ca ca.cert cert server.crt key server.key dh dh2048.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 172.31.0.0 255.255.0.0" keepalive 10 120 tls-auth ta.key 0 key-direction 0 cipher AES-128-CBC auth SHA256 comp-lzo user nobody group nogroup persist-key persist-tun status openvpn-status.log verb 3 # ROUTE CLIENT'S INTERNET ACCESS THROUGH THE SERVER push "redirect-gateway def1" push "remote-gateway vpn_server_ip" push "dhcp-option DNS 220.127.116.11" keepalive 10 60 crl-verify crl.pem
client dev tun proto udp remote MY-SERVER-IP PORT remote MY-SERVER-HOSTNAME PORT resolv-retry infinite nobind user nobody group nogroup persist-key persist-tun remote-cert-tls server comp-lzo push "redirect-gateway def1" verb 3