When using OpenVPN on Linux, I can't connect to anything on the internet. Firefox shows everything except my own router as "not found". And
curl -I google.com, for example, gives
curl: (6) Could not resolve host: google.com.
This is very different from Windows, where I can actually access any part of the internet (that I have tried so far) using OpenVPN with the same certificate and provider.
When not using OpenVPN on Linux, my systems connect just as well as with Windows.
(I'm running the VPN as a client in North America; the server is presumably somewhere in Europe.)
So what am I not doing that I need to do in order to connect?
Edit to answer a few questions:
curl -I 22.214.171.124 (a Google ip) indeed gives a valid response (HTTP/1.1 200 OK, etc.).
Not sure what the VPN peer ip is, but
ping 126.96.36.199 (the ip seen below) gives
64 bytes from 188.8.131.52: icmp_seq=1 ttl=64 time=#.### ms (the #.### being various amounts of milliseconds). The ping goes on more than 300 times, so I think that works, but I could be wrong.
ip addr (I can't copy and paste between machines, so I may have made some errors below):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0 <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:6f:e2:eb brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::a00:27ff:fe6f:e2eb/64 scope link valid_lft forever preferred_lft forever 3: tap0 <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 2a:d6:30:43:a2:8e brd ff:ff:ff:ff:ff:ff inet 184.108.40.206/24 brd 220.127.116.11 scope global tap0 valid_lft forever preferred_lft forever inet6 fe80:28d6:30ff:fe43:e28e/64 scope link valid_lft forever preferred_lft forever
0.0.0.0/1 via 18.104.22.168 dev tap0 default via 10.0.2.2 dev eth0 proto static 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 1 22.214.171.124 via 10.0.2.2 dev eth0 126.96.36.199/1 via 188.8.131.52 dev tap0 184.108.40.206/24 dev tap0 proto kernel scope link src 220.127.116.11
iptables -L -nv:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
I downloaded the config files from the service provider, along with a certificate. On Linux, I just run
sudo openvpn config.ovpn (inside Konsole). On Windows, I just use the GUI (not sure if that's relevant).
config.ovpn contains (lines listed with
address actually contain an address (not an ip), which I removed for privacy):
client dev tap proto udp remote address 1194 remote address 1195 remote address 1196 remote address 1197 remote address 1198 remote address 1199 remote address 1200 remote address 1201 remote-random resolv-retry infinite auth-user-pass nobind persist-key persist-tun ns-cert-type server ca ca.crt comp-lzo reneg-sec 0 verb 3
Aside from using the config file and certificate, I just installed openvpn (compiled to
/usr/local/sbin and via apt-get to
/usr/sbin; the above information is using the one in
/usr/sbin/openvpn but they result in the same behaviour).
Having looked at the above (though I'm no expert), it looks like OpenVPN is active, but the system is still defaulting to
eth0 instead of
tap0. Question remains the same: "What am I not doing that I need to do in order to connect?"