OpenVPN Client Connects, Can Ping Server. Nothing Else Works

openvpn

I've setup a new ubuntu server and I installed openvpn. The ip address of the server is 192.168.0.182.

I connected my iPhone to the VPN and it connected successfully, I can ping 192.168.0.182 and 10.8.0.1 successfully but I can't seem to ping anything else. I also cannot access the internet as all pages time out.

This is what my openvpn config looks like:

port 4050

proto tcp

dev tun

ca ca.crt
cert noahvt.crt
key noahvt.key  # This file should be kept secret

dh dh2048.pem

server 10.8.0.0 255.255.255.0

ifconfig-pool-persist ipp.txt

push "redirect-gateway def1 bypass-dhcp"

push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

keepalive 10 120

tls-auth ta.key 0 # This file is secret
key-direction 0

cipher AES-128-CBC   # AES
auth SHA256

comp-lzo

user nobody
group nogroup

persist-key
persist-tun

status openvpn-status.log

verb 3

I exactly followed this guide to get it setup: link

I DO NOT however have a firewall installed as I'm going to see if this works first.

I've tried a few things to get it working like:

  • Changing DNS
  • Changing the protocol
  • Adding a route

None of these made a difference though.

Any ideas on what could be wrong?

Best Answer

You need the server to push a route to the client for IP addresses that are not on the gateway IP address's subnet.

Your server config file statement will look like this:

push "route 10.66.0.0 255.255.255.0"

OpenVPN (that's their example, btw) explains this well on the OpenVPN HOWTO page.