OpenVPN Client on Raspbian - Possible DNS Issues?
Posted: Mon Dec 14, 2015 2:41 am
Hello guys,
My goal is to route all internet traffic over a VPN, and all LAN traffic will flow normally, so I can still SSH in and such. I am running Raspbian on a first-generation Raspberry Pi.
So far I have installed OpenVPN from binaries and I have opened a network interface on tun0. However, while tun0 is active, I am unable to load webpages. LAN traffic still works. This tells me that it is routing all internet traffic over tun0 (which is what I want), but that I am having DNS resolution issues on tun0. I am able to successfully ping external IPs via tun0 with "ping 8.8.8.8 -I tun0".
If I run a traceroute over tun0, I can see that it is routing to my VPN provider's servers, so the tunnel is established.
If I run an ifconfig, I get output similar to below:
Any idea what I'm doing wrong, and how I might successfully route all internet traffic over tun0? Any help would be greatly appreciated, and I can provide any other details or diagnostics on request. Thanks!
My goal is to route all internet traffic over a VPN, and all LAN traffic will flow normally, so I can still SSH in and such. I am running Raspbian on a first-generation Raspberry Pi.
So far I have installed OpenVPN from binaries and I have opened a network interface on tun0. However, while tun0 is active, I am unable to load webpages. LAN traffic still works. This tells me that it is routing all internet traffic over tun0 (which is what I want), but that I am having DNS resolution issues on tun0. I am able to successfully ping external IPs via tun0 with "ping 8.8.8.8 -I tun0".
If I run a traceroute over tun0, I can see that it is routing to my VPN provider's servers, so the tunnel is established.
If I run an ifconfig, I get output similar to below:
Code: Select all
eth0 Link encap:Ethernet HWaddr ##:##:##:##:##:##
inet addr:192.168.0.9 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: ####::####:####:####:3800/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15948 errors:0 dropped:0 overruns:0 frame:0
TX packets:13401 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12452593 (11.8 MiB) TX bytes:7170890 (6.8 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:70391 errors:0 dropped:0 overruns:0 frame:0
TX packets:70391 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:164655296 (157.0 MiB) TX bytes:164655296 (157.0 MiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.38 P-t-P:10.8.0.37 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:130 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8512 (8.3 KiB) TX bytes:9726 (9.4 KiB)