openvpn and routing


my openvpn server is a redhat linux machine.

My net is, the openvpn server is

The openvpn server has an ethernet interface connected to my LAN and a default gateway to the modem/router (

The openvpn software serves many different operationg systems (linux, mac and win). The openvpn clients get an ip-address from the

The openvpn server has a tun0 interface with the address and a route to, 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 and has the ip The server has the ip

I'd like to set a route on the client, that garantees, that all packages sent to are routed through the openvpn tunnel.

On a linux client, which was assigned the first /30 subnet ( I tried two versions:

route add -net gw which resulted in a "network not found" error messagen

the other command is route add -net gw which was accepted. But sending packages to the server doesn't work. Contacting a webserver on this 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


Reply to
Boris Glawe
Loading thread data ...

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.

I can't even guess on that, hopefully someone will be able to explain.

Reply to
Bill Davidsen Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.