Openvpn -- no local network acces form the client

Nov 08, 2005 1 Replies

Hi there I have a problem... with routing



i've set up a vpn tunnel on openvpn between winxp-client .. linux slackware-serwer (router)... 10.8.0.2



10.8.0.1

what routing rule should I use on a server .. to be able to browse the local network behind the router..



route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface



10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
62.233.157.40 0.0.0.0 255.255.255.252 U 0 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 62.233.157.41 0.0.0.0 UG 1 0 0 eth0

I think something is missing here...



greetings.. Adam


root@necro:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:04:76:E5:05:22 inet addr:62.233.157.42 Bcast:62.233.157.43 Mask:255.255.255.252 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4770431 errors:4 dropped:0 overruns:0 frame:6 TX packets:4805954 errors:0 dropped:0 overruns:0 carrier:0 collisions:38958 txqueuelen:1000 RX bytes:3608996395 (3441.8 Mb) TX bytes:2017110833 (1923.6 Mb) Interrupt:11 Base address:0xc400



eth1 Link encap:Ethernet HWaddr 00:10:A7:10:A4:7C inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4662233 errors:0 dropped:0 overruns:0 frame:0 TX packets:4616831 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1997789214 (1905.2 Mb) TX bytes:3594392550 (3427.8 Mb) Interrupt:12 Base address:0x3000



lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:17 errors:0 dropped:0 overruns:0 frame:0 TX packets:17 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1428 (1.3 Kb) TX bytes:1428 (1.3 Kb)



tun0 Link encap:UNSPEC HWaddr



00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:29 errors:0 dropped:0 overruns:0 frame:0 TX packets:4905 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:2076 (2.0 Kb) TX bytes:1285172 (1.2 Mb)



You have a two-fold problem: Your WinXP machine lives on one network and all the machines to which it wants to speak live on a different network. The only thing that knows about both at the moment is your Linux machine that gateways between them.

You must add a routing entry at the WinXP machine to teach it that

192.168.10.0/24 is reached via the gateway, and all machines that want to be able to reach the 10.8.x.y network must have routing entries which similarly identify the gateway. If the latter is represented by the gateway machine already being identified as the default route, your problem is half solved.

Nothing needs to be done to routing on the gateway itself, as far as I can see, because it already knows how to reach 10.8.0.2 and

192.168.10.0/24. It is all your other hosts that lack understanding.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required