LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   openVPN routing - Windows client (https://www.linuxquestions.org/questions/linux-networking-3/openvpn-routing-windows-client-4175580080/)

vincix 05-18-2016 07:32 AM

openVPN routing - Windows client
 
Hi,

I've just configured my first openvpn server. It works. I can connect to it. My internet connection doesn't work anymore, but that's not the problem in itself. I need to get the iptables rules and some push directives right.

Windows uses 10.0.2.0/24 as the local network, with 10.0.2.1 as gateway. The internet works fine when I'm not connected to the vpn.

the VPN lan is 10.8.0.0/24.

But what is strange is that when I write "route print" in the command line, it says:

network destionation: 0.0.0.0
network mask: 0.0.0.0
Gateway: 10.0.2.2
interface: 10.0.2.15
metric: 10

And the second row:
network destionation: 0.0.0.0
network mask: 128.0.0.0
Gateway: 10.0.2.0
interface: 10.8.0.6
metric: 20

So my question is, why is the data being routed through the second gateway, if the first has a lower metric?

ferrari 05-18-2016 08:26 PM

This doesn't look like the complete story. Is that the entire routing table output? If not, it might be helpful if you just mark/paste the windows output so that the original formatting is also preserved

vincix 05-20-2016 04:56 AM

Active Routes:
Quote:

Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 10
0.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 20
10.0.2.0 255.255.255.0 On-link 10.0.2.15 266
10.0.2.15 255.255.255.255 On-link 10.0.2.15 266
10.0.2.255 255.255.255.255 On-link 10.0.2.15 266
10.8.0.1 255.255.255.255 10.8.0.5 10.8.0.6 20
10.8.0.4 255.255.255.252 On-link 10.8.0.6 276
10.8.0.6 255.255.255.255 On-link 10.8.0.6 276
10.8.0.7 255.255.255.255 On-link 10.8.0.6 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
128.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 20
MY SERVER'S IP 255.255.255.255 10.0.2.2 10.0.2.15 10
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.8.0.6 276
224.0.0.0 240.0.0.0 On-link 10.0.2.15 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.8.0.6 276
255.255.255.255 255.255.255.255 On-link 10.0.2.15 266
Indeed, now I see that in the row where my server's ip shows up, the metric is also 10. So the more specific networks have priority?

ferrari 05-20-2016 07:57 AM

In a word, yes.


All times are GMT -5. The time now is 05:21 AM.