I've set up openvpn on my pi and am running into a small issue. I can connect to the VPN server and ping it just fine, and I can also connect to other machines on my local network. However I am unable, when connected to the VPN, to reach the outside world (either by name lookup or IP).
here are the details:
On the server the tun0 interface:
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.8.0.1 netmask 255.255.255.255 destination 10.8.0.2
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I can ping it just fine:
# ping -c 3 10.8.0.1
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=0.159 ms
64 bytes from 10.8.0.1: icmp_seq=2 ttl=64 time=0.155 ms
64 bytes from 10.8.0.1: icmp_seq=3 ttl=64 time=0.156 ms
--- 10.8.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
Routing table
# ip route show
default via 192.168.1.1 dev eth0 metric 204
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.6 metric 204
I also have ip traffic forwarding:
net.ipv4.ip_forward = 1
I do not have any custom iptables rules (that I'm aware of).
On the client, I can connect to the VPN. Here is my tun0:
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.8.0.6 netmask 255.255.255.255 destination 10.8.0.5
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 21 bytes 1527 (1.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
And on the client I can ping it:
sudo ping -c 3 10.8.0.6
PING 10.8.0.6 (10.8.0.6) 56(84) bytes of data.
64 bytes from 10.8.0.6: icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from 10.8.0.6: icmp_seq=2 ttl=64 time=0.026 ms
64 bytes from 10.8.0.6: icmp_seq=3 ttl=64 time=0.032 ms
--- 10.8.0.6 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.026/0.031/0.035/0.003 ms
I can ssh from the client into another server on my LAN (192.168.1.x), however I cannot reach anything outside my LAN.
Here's some of the server logs at the bottom of this gist: https://gist.github.com/coleifer/6ef95c3008f130249933/edit
I am frankly out of ideas! I don't think it's my client because both my laptop and my phone (which has an openvpn client) exhibit the same behavior.
I had OpenVPN installed on this pi before using debian and it worked, so I don't think it's my router but of course anything is possible.