Bug #5981
closed
OpenVPN gateways incorrectly handled with tap
Added by Chris Buechler over 8 years ago.
Updated over 8 years ago.
Description
ovpn-linkup skips config of gateways for non-tun instances.
Files
- Status changed from Confirmed to Feedback
I don't know why but $route_vpn_gateway is always empty here. I've added some debug info to the /usr/local/sbin/ovpn-linkup script:
/bin/echo "ifconfig_local=$ifconfig_local; route_vpn_gateway=$route_vpn_gateway; route_net_gateway=$route_net_gateway; dev_type=$dev_type;" > /tmp/${1}_router_dbg
Here is an output:
ifconfig_local=172.22.0.2; route_vpn_gateway=; route_net_gateway=; dev_type=tap;
Somehow OpenVPN doesn't initialize it's variables before calling "up" script. Also, I've attached ovpn log;
Here is a config file. Nothing fancy is there.
See the details I have in #5835 for that specific case which isn't quite the same as the original problem here.
- Status changed from Feedback to Resolved
OpenVPN only has route_vpn_gateway in its environment variables if a route is pushed, even when you push route_vpn_gateway it's not in the env unless there is a route to use with it. That tripped me up at first when working on this. It really ought to be there any time it's pushed, but that'd be something to pursue upstream with OpenVPN.
this works now.
Also available in: Atom
PDF