how to add a kernel's route on the openvpn server?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Oct 29, 2010 10:02 am
how to add a kernel's route on the openvpn server?
how to add a kernel's route on the openvpn server when a client connected.
I know that the ccd files can auto add a LAN route on server, but it is internal route, not is kernel's route.
iroute 192.168.0.0 255.255.255.0
the options "--route" is not my expectation, because I have a lot of client, I want get the his LAN route when the client connected.
Thanks
I know that the ccd files can auto add a LAN route on server, but it is internal route, not is kernel's route.
iroute 192.168.0.0 255.255.255.0
the options "--route" is not my expectation, because I have a lot of client, I want get the his LAN route when the client connected.
Thanks
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: how to add a kernel's route on the openvpn server?
you do want --route
i dont understand why you think you dont
did you read my writeup here?
viewtopic.php?f=8&t=98
i dont understand why you think you dont
did you read my writeup here?
viewtopic.php?f=8&t=98
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Oct 29, 2010 10:02 am
Re: how to add a kernel's route on the openvpn server?
Yeah, I had read your writing.
I want setup another openvpn server to implement failover function.
so I running the zebra on the vpn servers to communicate with internal OSPF router, but the zebra only recognize the kernel route.
it means that there are two vpn servers configured on the clients, when one server can't reachable, the clients can auto connect to another vpn server. so the internal router(hosts) need get new route to access the LAN behind clients.
thanks your respond.
I want setup another openvpn server to implement failover function.
so I running the zebra on the vpn servers to communicate with internal OSPF router, but the zebra only recognize the kernel route.
it means that there are two vpn servers configured on the clients, when one server can't reachable, the clients can auto connect to another vpn server. so the internal router(hosts) need get new route to access the LAN behind clients.
thanks your respond.
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: how to add a kernel's route on the openvpn server?
you cannot do this in client/server with tun
you either need tap (do not need a bridge, just tap) or a ptp (instead of client/server)
you either need tap (do not need a bridge, just tap) or a ptp (instead of client/server)
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Oct 29, 2010 10:02 am
Re: how to add a kernel's route on the openvpn server?
do you mean that if I configure tap virtual interface, it will add a kernel route?
unlucky, my client box not support tap interface.
unlucky, my client box not support tap interface.
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: how to add a kernel's route on the openvpn server?
well the problem you will have is dynamically adding iroutes for the client when other lans are behind it... using tap gets around that
the other way to get around it is using a bunch of ptp links
then you can let ospf do its thing over the vpn
the other way to get around it is using a bunch of ptp links
then you can let ospf do its thing over the vpn
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Oct 29, 2010 10:02 am
Re: how to add a kernel's route on the openvpn server?
Hi, krzee.
Sorry, I can’t quite understand the solution that you said. Could you please explain more detail?
Is there another solution using openvpn scripting function?
Another striking option of OpenVPN is its scripting capabilities. We can create our own scripts and have them called on changes of the connection state. This makes it easy to execute a special script any time a client connects or on similar occasions
OpenVPN has several points of time when scripts can be executed. Like one of them, --route-up <command>.
the problem is, How can I configure openvpn server to execute a special script when a special client connected ?
Like ccd file script, it is only executed when special client connected, Not for all client.
Sorry, I can’t quite understand the solution that you said. Could you please explain more detail?
Is there another solution using openvpn scripting function?
Another striking option of OpenVPN is its scripting capabilities. We can create our own scripts and have them called on changes of the connection state. This makes it easy to execute a special script any time a client connects or on similar occasions
OpenVPN has several points of time when scripts can be executed. Like one of them, --route-up <command>.
the problem is, How can I configure openvpn server to execute a special script when a special client connected ?
Like ccd file script, it is only executed when special client connected, Not for all client.
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: how to add a kernel's route on the openvpn server?
https://www.secure-computing.net/wiki/i ... RIPRoutingfondpiggy wrote:Hi, krzee.
Sorry, I can’t quite understand the solution that you said. Could you please explain more detail?
see "what didnt work"
--client-connect <script>, runs script on client connection. This can be useful for generating firewall rules dynamicly, or for assigning static ips. This can do anything that a ccd (see !ccd) entry can do, but dynamicly... to use it that way, you should write your dynamic ccd commands to the file named by $1How can I configure openvpn server to execute a special script when a special client connected ?
Like ccd file script, it is only executed when special client connected, Not for all client.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Nov 30, 2010 5:56 pm
Re: how to add a kernel's route on the openvpn server?
Using bridge mode have a try
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: how to add a kernel's route on the openvpn server?
you dont need a bridge, just tap