Nodes > Projects > VPNH


VPNH is a small Ruby script / daemon that is mainly a wrapper around OpenVPN for split VPN tunneling. The script sets up a special user under which everything runs within the VPN, and everyone else runs outside of the VPN. It also maintains the connection by monitoring it. I use it for my home seed box with Plex and Fezly.

The script creates a new user called the vpnh_user, this is the user that is intended to use the VPN interface. It then create iptable rules in order to ensure that all packets go through the VPN interface. It attempts to ensure that if the vpn connection is down, the vpnh_user cannot to the default interface. This blocking is necessary to ensure that potentially dangerous traffic not be exposed outside of a VPN tunnel.

The CLI is very simple, letting the user add/remove OpenVPN files and sets of authorization credentials. Once a connection is started, VPNH continuously checks the state of the connection, ensuring that the external IP of the vpnh_user is different from that of the regular user.

For more information on usage see the README linked in the links section below.