You need
#/etc/openvpn/foo/bar/remo
iroute BB.BB.BB.0 255.255.255.0 # to notify openvpn should route that network to that remote
#/etc/openvpn/my-server.co
push "route AA.AA.AA.0 255.255.255.0" # to configure remote to route back to us
route BB.BB.BB.0 255.255.255.0 # to configure local routing table (You probably was missing that one)
Main Topics
Browse All Topics





by: duncan_roePosted on 2009-09-30 at 15:24:28ID: 25464241
and /etc/openvpn/foo/bar/remot e.host.nam e contains the line
iroute BB.BB.BB.0 255.255.255.0
which to my knowledge should cause the route to be added automatically.
Really?? How does that line tell anyone that the gateway is host number 2?
I find it difficult to help in questions where all config data is hidden as AA, BB, foo, bar etc.Of course you have concerns about security, but really do you have to hide everything? I have been badly bitten in the past both in asking and answering questions by a failure to supply complete detail. And I've been flamed (on this site) for asking for that detail.
So I dunno. It seems to me that we need to establish how the gateway gets added at boot. Were you to post your my-server.conf, we experts could see whether it contains the gateway information or not. If not, the question arises as to what does contain it - which might lead to what are the commands you could use to get the desired result.
Alternatively you could write yourself a shell script to restart openvpn and re-add the route.