Remote GW variable

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
SimWhite
OpenVpn Newbie
Posts: 1
Joined: Wed Feb 14, 2018 10:48 am

Remote GW variable

Post by SimWhite » Wed Feb 14, 2018 11:01 am

Hi all. I try to to make some route paths with additional scripts and I have a problem.

From the manual of OpenVPN:

Code: Select all

--up cmd
Run command cmd after successful TUN/TAP device open (pre --user UID change).

For --dev tun execute as:
cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [ init | restart ]

For --dev tap execute as:
cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [ init | restart ]
I use tun in my client configuration but I get ifconfig_netmask instead of ifconfig_remote_ip as $5 environmental variable.

Code: Select all

/sbin/ip addr add dev tun11 10.1.1.3/24 broadcast 10.1.1.255
/etc/openvpn/up_script.sh tun11 1500 1555 10.1.1.3 255.255.255.0 init
Why I didn't get remote GW address and how can I get it?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Remote GW variable

Post by TinCanTech » Wed Feb 14, 2018 1:03 pm

You are using --topology subnet .. see --topology in the manual.

Post Reply