Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have setup a tunneling VPN between two machine. One end is 192.168.100.1 (server), the other end is (192.168.100.2). The network mask of the distant site is 192.168.123.255, ie the server has two network interfaces :

192.168.123.114
192.168.100.1

On linux, I have access to the 192.168.123.114 address if I do the following in the config file:

#ifconfig directive
ifconfig 192.168.100.2 192.168.100.1
route 192.168.123.0 255.255.255.0 192.168.100.2

On Windows 7, the same config file, launched as administrator is also establishing the route according to openvpn log :

Tue Oct 12 09:24:16 2010 Peer Connection Initiated with xx.xx.xx.xx:yyyy
Tue Oct 12 09:24:22 2010 TEST ROUTES: 1/1 succeeded len=1 ret=1 a=0 u/d=up
Tue Oct 12 09:24:22 2010 C:\WINDOWS\system32\route.exe ADD 192.168.123.0 MASK 255.255.255.0 192.168.100.2
Tue Oct 12 09:24:22 2010 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Tue Oct 12 09:24:22 2010 Route addition via IPAPI succeeded [adaptive]
Tue Oct 12 09:24:22 2010 Initialization Sequence Completed

But when I try to ping 192.168.132.114, it does not work, and if I try http://192.168.1123.114/ it does not work either, but it works with 192.168.100.1

How can I make the routing directive effective ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

you've run into a routing quirk when using windows compared to using Linux ; try

route 192.168.123.0 255.255.255.0 192.168.100.1

i.e. change the remote endpoint; windows seems to want to have the actual remote endpoint for a route to work, whereas Linux/UNIX want the IP address of the interface.

HTH,

JJK

share|improve this answer
    
You are right, Thank you ! –  shodanex Oct 12 '10 at 9:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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