Hi all,
I have searched for this topic in the documentation, on the web and in the forums but haven't found anything related or haven't searched well enough. Please point me in the right direction if this has been discussed before.
Basically, we have a linux (debian lenny) router and openvpn server on the same machine. Connected to this machine are uplinks to 2 ISP's. All traffic except for 3 machines are routed through ISP A, and the 3 machines are routed through ISP B. This is a setup like found here:
http://lartc.org/howto/lartc.rpdb.multiple-links.html with one difference. I added only one routing table for ISP B and I am using the "main" routing table for ISP A. This means that on this machine we have 2 different routing tables.
This all is working great, except for one thing: OpenVPN is dynamically adding/removing routes on startup/shutdown, which is fine. However, it only does this in the "main" routing table.
I need a few routes added to the ISP B routing table as well. I currently work around this by manually adding those routes in an init script but this is a dirty workaround. Trying to added them in the interfaces configuration file is not good either as the tun0 interface isn't up yet when the eth interfaces are being configured.
Is there any way to tell openvpn to add routes to other routing tables as well?
See below the server configuration file.
port 1194
proto udp
dev tun
ca easy-rsa/keys/ca.crt
cert easy-rsa/keys/server.crt
key easy-rsa/keys/server.key # This file should be kept secret
dh easy-rsa/keys/dh1024.pem
server 10.9.0.0 255.255.255.0 # Untrusted range
ifconfig-pool-persist ipp.txt
push "route 172.16.32.0 255.255.224.0"
push "route 172.16.0.0 255.255.224.0"
client-config-dir ccd
route 10.0.0.0 255.255.255.0
route 10.0.2.0 255.255.255.0
route 10.1.0.0 255.255.0.0
route 10.2.0.0 255.255.0.0
route 10.9.1.0 255.255.255.0
route 10.10.0.0 255.255.248.0
route 10.20.0.64 255.255.255.192
route 10.21.0.0 255.255.0.0
route 10.30.0.0 255.255.255.0
route 10.31.0.0 255.255.128.0
route 10.31.128.0 255.255.128.0
route 10.40.0.0 255.255.255.0
route 10.41.0.0 255.255.128.0
route 10.41.128.0 255.255.128.0
route 10.50.0.0 255.255.255.0
route 10.51.0.0 255.255.128.0
route 10.51.128.0 255.255.128.0
route 10.128.0.0 255.255.0.0
route 217.111.145.16 255.255.255.240
route 10.9.9.0 255.255.255.0
push "dhcp-option WINS 172.16.35.237"
client-to-client
keepalive 10 120
tls-auth easy-rsa/keys/ta.key 0 # This file is secret
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
mute 20
crl-verify easy-rsa/keys/crl.pem
max-routes-per-client 2048
Thanks for any help!