Project

General

Profile

Bug #5981

OpenVPN gateways incorrectly handled with tap

Added by Chris Buechler over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
OpenVPN
Target version:
Start date:
03/11/2016
Due date:
% Done:

0%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

ovpn-linkup skips config of gateways for non-tun instances.

openvpn.log (1.93 KB) openvpn.log Dmitriy K, 03/12/2016 05:23 AM
client3.conf (634 Bytes) client3.conf Dmitriy K, 03/12/2016 05:26 AM

Associated revisions

Revision e0712c75 (diff)
Added by Chris Buechler over 3 years ago

Use route_vpn_gateway for tap-type OpenVPN instances as well where specified. Remove old and wrongly copy/pasted comments while here. Ticket #5981

History

#1 Updated by Chris Buechler over 3 years ago

  • Status changed from Confirmed to Feedback

works now

#2 Updated by Dmitriy K over 3 years ago

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;

#3 Updated by Dmitriy K over 3 years ago

Here is a config file. Nothing fancy is there.

#4 Updated by Jim Pingle over 3 years ago

See the details I have in #5835 for that specific case which isn't quite the same as the original problem here.

#5 Updated by Chris Buechler over 3 years ago

  • 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