Nethub is a gateway service which combines VPN Privacy and P2P networking.
- User-friendly interface for service stats, changing VPN connection and N2N settings.
- Isolated NordVPN or ProtonVPN gateway for extra security and sharing a VPN connection to multiple devices on the network.
- Built-in N2N for private P2P networking, even behind a firewall.
- Easily deployable as a VM or IOT device.
Nethub Virtual Architecture
---------------------------
VM1 | | ProtonVPN
VM2 | Nethub | N2N Supernode
VM3 | | NordVPN
Example Edge Architecture
-----------------------------------
Website | | Nethub 1
Pi-hole | Edge/Supernode | Nethub 2
Shares | | Nethub 3
- ❗ To allow IP whitelisting on the supernode by bypassing the VPN for P2P connections, supernode_bypass_vpn in nethub.conf can be set to true.
- 🚀 Any device connected to Nethub's LAN interface will be automatically connected through DHCP.
Click the diagram to enlarge it.
Nethub's edge service uses Ntop's N2N to provide connection to a public or self-hosted supernode. The supernode can create P2P connections with other Nethub instances or separate N2N edges. Settings for the edge can be configured through the Nethub VM's interface.
Click the diagram to enlarge it.
Nethub's VPN service uses openvpn to create a VPN connection to either NordVPN or ProtonVPN. VPN settings such as country, protocol or credentials can be changed through Nethub's interface.
Warning: the installation of Nethub will make critical changes to your device. Make sure you know what you are doing.
- Virtual Ubuntu 20 LTS server.
- N2N 3.0.0-1038
- Virtual WAN network adapter.
- Virtual LAN network adapter.
- Download N2N:
- Download Nethub.
- Run
sudo dpkg -i n2n_<version>_amd64.deb
. - Run
sudo apt-get install ./nethub_<version>_amd64.deb
.- Select
YES
when asked to save IPv4 and IPv6 tables. - Enter the name of your
WAN interface
. - Enter the name of your
LAN interface
.
- Select
- Reboot:
sudo shutdown -r now
.
For the complete manual use man nethub
or nethub --help
.
- Download OVPN files.
# Download NordVPN servers automatically. # ProtonVPN servers have to be downloaded manually as instructed from nethub download. nethub download
- Set credentials.
# Set credentials and server for ProtonVPN. nethub set proton --username ... --password ... # Set credentials and server for NordVPN. nethub set nord --username ... --password ...
- Connect.
# Connect to NordVPN nethub connect nord --country us # Re-connect to ProtonVPN nethub connect proton --country nl
- Get ip and country.
# Get the connection details nethub status connection
# This is the result that will display. Fetching connection information. This may ~4 seconds. ----------------------------------------------------------- PING 8.8.8.8 (8.8.8.8) from 10.8.2.10 tun0: 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=13.8 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=13.7 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=13.7 ms --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 13.677/13.740/13.820/0.059 ms ----------------------------------------------------------- { "ip": "193.29.60.136", "city": "Amsterdam", "region": "North Holland", "country": "NL", "loc": "52.3630,4.8924", "org": "AS49981 WorldStream B.V.", "postal": "1017", "timezone": "Europe/Amsterdam", "readme": "https://ipinfo.io/missingauth" } -----------------------------------------------------------
To run the tests please make sure you conform to the following prerequisites:
- Installed Nethub with the steps above.
- Have all the NordVPN and ProtonVPN servers downloaded.
- Have provided the NordVPN and ProtonVPN OVPN credentials.
- Know which tests to disable if you're not using all VPN providers or N2N.
To run the test invoke ./tests
In order to get new devices or servers into the N2N P2P network without installing or connecting to a Nethub VM follow these steps:
- Download and install N2N.
- Copy the configured
nethub.conf
file to the target server. - Copy the nethub_edge script to the target server.
- Copy the libraries folder for the exceptions.sh.
- Invoke
sudo ./nethub_edge
or create an edge.