Software SysAdmin

Setting NIC IP addresses as environment variables

An easy and reliable method for applying your NIC IP addresses to your environment and scripts.

Example: OpenVPN

In each of your OpenVPN configuration file(s) that are usually located in /etc/openvpn/, add 2 entries:

up /usr/local/bin/setup-network-environment
down /usr/local/bin/setup-network-environment

Leave a Reply

Your email address will not be published. Required fields are marked *