Bookmark this page:
Yahoo!
Windows Live
del.icio.us
digg
Netscape
|
|
||||||||||||||||
|
Posted by Boris Glawe on February 6, 2006, 12:50 pm
Please log in for more thread options my openvpn server is a redhat linux machine. My net is 192.168.1.0/24, the openvpn server is 192.168.1.100 The openvpn server has an ethernet interface connected to my LAN and a default gateway to the modem/router (192.168.1.5) The openvpn software serves many different operationg systems (linux, mac and win). The openvpn clients get an ip-address from the 192.168.2.0 The openvpn server has a tun0 interface with the address 192.168.2.1 and a route to 192.168.2.2, which seems to be a "local" link to the daemon. According to the openvpn faq, the server reserves a /30 subnet für each client. So the first client gets the subnet 192.168.2.4/30 and has the ip 192.168.2.6. The server has the ip 192.168.2.5 I'd like to set a route on the client, that garantees, that all packages sent to 192.168.1.0 are routed through the openvpn tunnel. On a linux client, which was assigned the first /30 subnet (192.168.2.4/30) I tried two versions: route add -net 192.168.1.0/24 gw 192.168.2.1 which resulted in a "network not found" error messagen the other command is route add -net 192.168.1.0/24 gw 192.168.2.5 which was accepted. But sending packages to the server doesn't work. Contacting a webserver on this 192.168.1.0 subnet results in timeouts. Are there any options for the client, that automatically sets the correct routes? What are the correct routing settings at all? What if the client is assigned another ip-address and thus another /30 subnet? In this case, the router has a totally different ip-address? Is there a way to automatically find out the correct router? thanks and greets Boris | ||||||||||||||||
|
Posted by Bill Davidsen on February 10, 2006, 12:34 pm
Please log in for more thread options Sure, there's a "route" directive in the config, just note that it doesn't seem to work with net/bits notation, but "net mask" as dotted quads seems to work for us. >
> What if the client is assigned another ip-address and thus another /30 > subnet? In this case, the router has a totally different ip-address? Is > there a way to automatically find out the correct router? I can't even guess on that, hopefully someone will be able to explain. -- CTO TMR Associates, Inc Doing interesting things with small computers since 1979 | ||||||||||||||||
| Similar Threads | Posted |
| openvpn and routing | February 6, 2006, 12:50 pm |
| openvpn Routing Problem | October 31, 2006, 7:58 am |
| OpenVPN | October 22, 2005, 8:54 pm |
| openvpn & pptp | February 7, 2005, 8:56 pm |
| OpenVPN DNS problem | March 27, 2005, 5:17 pm |
| An ode to OpenVPN, and a question | September 17, 2005, 10:06 pm |
| openvpn windows xp client | August 25, 2005, 7:45 am |
| openvpn one client and more servers. | November 26, 2005, 12:16 pm |
| OpenVPN on local network | December 18, 2005, 7:35 am |
| OpenVPN certificate question | May 3, 2006, 11:31 pm |
| compression with openvpn or with ppp, best practice | September 8, 2008, 4:23 pm |
| Warcraft 3 LAN game through openvpn not working | April 20, 2005, 9:35 am |
| openvpn problem with w2000 clients | April 12, 2008, 8:33 pm |
| Openvpn setup problem - linking 2 192.168.0 nets together | September 26, 2006, 1:20 pm |
| Automatically assign DNS names to openVPN clients? | May 30, 2007, 5:59 pm |

openvpn and routing
Yahoo!
Windows Live
del.icio.us
digg
Netscape 


>
> my openvpn server is a redhat linux machine.
>
> My net is 192.168.1.0/24, the openvpn server is 192.168.1.100
>
> The openvpn server has an ethernet interface connected to my LAN and a
> default gateway to the modem/router (192.168.1.5)
>
> The openvpn software serves many different operationg systems (linux,
> mac and win). The openvpn clients get an ip-address from the 192.168.2.0
>
> The openvpn server has a tun0 interface with the address 192.168.2.1 and
> a route to 192.168.2.2, which seems to be a "local" link to the daemon.
>
> According to the openvpn faq, the server reserves a /30 subnet für each
> client. So the first client gets the subnet 192.168.2.4/30 and has the
> ip 192.168.2.6. The server has the ip 192.168.2.5
>
>
>
> I'd like to set a route on the client, that garantees, that all packages
> sent to 192.168.1.0 are routed through the openvpn tunnel.
>
> On a linux client, which was assigned the first /30 subnet
> (192.168.2.4/30) I tried two versions:
>
> route add -net 192.168.1.0/24 gw 192.168.2.1
> which resulted in a "network not found" error messagen
>
> the other command is
> route add -net 192.168.1.0/24 gw 192.168.2.5
> which was accepted. But sending packages to the server doesn't work.
> Contacting a webserver on this 192.168.1.0 subnet results in timeouts.
>
> Are there any options for the client, that automatically sets the
> correct routes? What are the correct routing settings at all?