Nodes > Projects > VPNH

VPNH

VPNH is a small Ruby script / daemon that is mainly a wrapper around OpenVPN for split VPN tunneling. The script creates a special user under which everything runs within the VPN, and everyone else runs outside of the VPN. It 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 which will be configured 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 connect to the default interface. This blocking is necessary to ensure that potentially dangerous traffic is not exposed outside of a VPN tunnel.

The CLI is very simple, it allows the user to add/remove OpenVPN files and manage 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 regular users.

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