I just setup the OpenVPN and it is working as expected. However, the routing table of the client is confusing me to no end. Here is the route table:# route -nKernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Iface10.8.0.5        0.0.0.0         255.255.255.255 UH    0      0        0 tun010.8.0.1        10.8.0.5        255.255.255.255 UGH   0      0        0 tun054.202.18.143   10.0.2.2        255.255.255.255 UGH   0      0        0 eth010.0.2.0        0.0.0.0         255.255.255.0   U     1      0        0 eth0169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth00.0.0.0         10.8.0.5        128.0.0.0       UG    0      0        0 tun0128.0.0.0       10.8.0.5        128.0.0.0       UG    0      0        0 tun00.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0So lets dissect it line-by-lineAny packet destined for 10.8.0.5 has no gateway and will use tun0any packet destined for 10.8.0.1 will use 10.8.0.5 as gateway via tun0any packet destined for 54.202.18.143 will use 10.0.2.2 as gateway via eth0any packet destined for 10.0.2.0/24 has no gateway and will use eth0Lets ignore the 169.254.0.0 partAll other packets (destined for 0.0.0.0) will us 10.8.0.5 as default gateway via tun0. So this is default gateway, isn't it?Any packet destined for 128.0.0.0/7 will use 10.8.0.5 as default gateway via tun0All other packets (0.0.0.0) will use 10.0.2.2 as default gateway via eth0Questions:Do I have 2 default gateways if we consider point 6 and 8? (there can be only 1 Default Gateway though, so I know I am wrong but can't justify) (probably answered, see below)Considering point 1 and 2, anything going for 10.8.0.1 is not really using any gateway via tun0. Is this correct?Considering point 3 and 4, anything going for 54.202.18.143 is not really using any gateway via eth0. Is this correct?UPDATE...After reading this, I found some more information. The below lines makes a lot of sense to me now:0.0.0.0         10.8.0.5        128.0.0.0       UG    0      0        0 tun0128.0.0.0       10.8.0.5        128.0.0.0       UG    0      0        0 tun0So, the 1st line is defining 0.0.0.0/128.0.0.0 and second one is defining 128.0.0.0/128.0.0.0. Essentially:0.0.0.0/128.0.0.0 = 0.0.0.0/1 = 0.0.0.0 TO 127.255.255.255128.0.0.0/128.0.0.0 = 128.0.0.0/1 = 128.0.0.0 TO 255.255.255.255So, above 2 routes are covering the entire IPv4 Address range [0.0.0.0 TO 255.255.255.255]. It is a clever way of OpenVPN to add a default route without replacing the original default route and this default route will be routed via tun0.So I think I have an answer for my first question:Do I have 2 default gateways if we consider point 6 and 8?NO, there is only one default gateway and that is :0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
how to understand the routing table on an OpenVPN client
linux;networking;routing;openvpn