OpenVPN
Scenario
Depending on location the notebook might be connected to one of the networks contained in the VPN already. Else an own connection to the OpenVPN-server is needed.
This script will plug into ifupdown and start/stop OpenVPN based upon the IP-addresses of the network-adapters. If no NIC should have an IP associated with Network 1, 2 or 3 OpenVPN will be started, otherwise it will be stopped to prevent mix-/ hic-ups with the routing-table.
Requirements
- openvpn
- ifupdown
- ifplugd
Instructions
- download file
- edit file
chmod +x openvpn- copy into /etc/network/if-up.d
- symlink /etc/network/if-down.d/openvpn -> /etc/network/if-up.d if not already present
- restart networking
Files:
- Download:openvpn (downloaded 83 time(s))
Alternatives:
The new --client-connect script option of OpenVPN can be used to pass on route options depending on public IP.