My first question is whether or not my openvpn connection is working as it is supposed to (routing all network traffic via the tun0 interface).

When I type netstat -rn I get the following:

$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 wlan0 UGH       0 0          0 tun0 UH        0 0          0 tun0   U         0 0          0 wlan0

Does this mean that all data traffic is encrypted and routed via my OpenVPN server?

Further on: Could someone please explain to me what all this information means? What do different rows represent? What do all those flags mean? MSS? Window? irtt? etc...

  • 1
    It is rather long to explain in details but man route will give you the info about what are the parameters – laurent Nov 18 '13 at 13:34
  • Couldn't find a list of what different "Destination" IP meant. Where can I find that? – lindhe Nov 18 '13 at 20:57
  • 1
    Each line is a route and the destination IP with the netmask is the network ID to where this route is going. They are subnets or IPs, there is no list of them as they are the possible destinations in your system. 10.8.0 is your openvpn subnet and 192.168.0 is your local subnet. with netmask means all IP not defined by other routes (default route). To understand how a network is divided, you can look en.wikipedia.org/wiki/Subnetwork and explanation of what is a routing table at en.wikipedia.org/wiki/Routing_table. – laurent Nov 18 '13 at 21:19

No, (your default traffic) is going to (wlan0)

If you want to route everything external to your vpn, you need to add a new default route and to delete the current one:

sudo route del default
sudo route add default gw (where is the vpn gateway)

Openvpn has the option redirect-gateway to do it the way you want (without using the routes above manually).

Sending everything over the vpn is not the default behavior of a vpn and usually not it's main purpose. A VPN is to connect two remote endpoints so it sends only what needs to reach the other endpoint through the vpn and not everything. (VPN traffic is encrypted so it is slower than regular connection).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.