Nyr / openvpn-install

OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora
MIT License
18.98k stars 4.88k forks source link

Interface name instead of local IP address #590

Closed sunsetsystems closed 5 years ago

sunsetsystems commented 5 years ago

Some users of this script will want to configure a VPN server before the local IP address of the interface is known. It would be nice to have the option to specify the interface name (e.g. eth0) instead of its IP address. At run time the IP address can be obtained with a command such as:

IP=`ifconfig eth0 | perl -nle 's/ inet (\S+)/print $1/e'`

... though something else may be more universal.

Nyr commented 5 years ago

If you need to do that, using MASQUERADE is a better approach.

There are no plans to implement that into the script, MASQUERADE should only be implemented if the user really needs it.