LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-18-2016, 07:32 AM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
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?
 
Old 05-18-2016, 08:26 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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
 
Old 05-20-2016, 04:56 AM   #3
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
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?
 
Old 05-20-2016, 07:57 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
In a word, yes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 14.04 + OpenVPN + Stunnel + Windows 10 Client adenicol Linux - Newbie 0 04-26-2016 12:57 AM
how openvpn server push routing rule to client according to public ip of client? tony.he Linux - Networking 1 02-13-2014 11:12 PM
Error When converting Routing OpenVPN to bridge mode openvpn danmartinj Linux - Software 0 11-06-2009 09:23 AM
Can't start windows openvpn client bambeklis Linux - Networking 2 04-09-2008 08:14 AM
Openvpn client to client routing question soup Linux - Networking 0 02-16-2006 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration