Author
Message
bernd01 DD-WRT Novice Joined: 08 May 2012 Posts: 5
Posted: Tue May 08, 2012 21:29 Post subject: Routing Problem: route is not adding to the routing table
Hello everybody!
Unfortunately I am a newbie to routing tables but this is what I want to achieve:
route only certain traffic through the openvpn tunnel.
after connecting to the vpn my routing table looks like this (it routes all the traffic through the tunnel)
after deleting the selected route with:
Code: route del default gw 172.16.24.217 netmask 128.0.0.0 dev tun0
the route is gone as expected.
However, when I try to add a route for only one destination ip with:
Code: route add -net 50.16.250.15 gw 172.16.24.217 netmask 128.0.0.0 dev tun0
the new route won't show up in the routing table.
What I don't understand is, adding the default route with this code works again:
Code: route add default gw 172.16.24.217 netmask 128.0.0.0 dev tun0
Does anybody know, what I am doing wrong?
Your help will be really appreciated!
Thanks a lot,
Bernd
Back to top
Sponsor
BasCom DD-WRT Guru Joined: 29 Jul 2009 Posts: 1378 Location: Germany
Posted: Wed May 09, 2012 11:30 Post subject:
you cannot use netmask 128.0.0.0 !! this is no valid netmask! try 255.255.255.255 _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
Back to top
bernd01 DD-WRT Novice Joined: 08 May 2012 Posts: 5
Posted: Wed May 09, 2012 11:52 Post subject:
Hi BasCom,
Thanks for your reply!
But why is in my routing table before deleting the default route (the bold marked row in the picture) at genmask the value 128.0.0.0?
Or does that mean, Genmask is not netmask?
Thanks a lot!
Best regards,
Bernd
Back to top
BasCom DD-WRT Guru Joined: 29 Jul 2009 Posts: 1378 Location: Germany
Posted: Wed May 09, 2012 11:56 Post subject:
it does, but this is faulty. cant tell you why. _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
Back to top
bernd01 DD-WRT Novice Joined: 08 May 2012 Posts: 5
Posted: Wed May 09, 2012 20:00 Post subject:
Hi,
Thanks for the info. I've tried with 255.255.255.255, also 255.255.255.0, 255.255.0.0, 255.0.0.0... no luck...
i just can add a default route...
when i add a route with "route add-net ip" it does not work...
this is really frustrating...
Back to top
routvol DD-WRT User Joined: 02 Feb 2009 Posts: 87
Back to top
BasCom DD-WRT Guru Joined: 29 Jul 2009 Posts: 1378 Location: Germany
Posted: Thu May 10, 2012 16:18 Post subject:
bernd: it worked for me. you can also define routes in ovpn conf
just set "route 50.16.250.15 255.255.255.255 172.16.24.217" without ""
or try set in telnet without "dev tun0"
btw: your routing table looks very strange:
two default routes? guess there´s someting missconfigured.Strange netmasks and strange route to 128.0.0.0 _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
Back to top
bernd01 DD-WRT Novice Joined: 08 May 2012 Posts: 5
Posted: Tue May 15, 2012 18:37 Post subject:
I finally got it to work!!
1.) i have to use the netmask 255.255.255.255
2.) i have to use the command line tool telnet to set the routes. don't know why the web-gui command tool did not work...
so finally i could add a route with:
"route add -net 50.16.250.15 gw 172.16.73.113 netmask 255.255.255.255 dev tun0"
Thanks for all your replys!
Best regards,
Bernd
Back to top
BasCom DD-WRT Guru Joined: 29 Jul 2009 Posts: 1378 Location: Germany
Posted: Wed May 16, 2012 9:40 Post subject:
you´ll never told us,using webgui command line tool _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
Back to top
bernd01 DD-WRT Novice Joined: 08 May 2012 Posts: 5
Posted: Wed May 16, 2012 11:02 Post subject:
yep, you are right. i did not know, that this makes any difference
Cheers,
Bernd
Back to top