redNixon / nethub

Nethub is a virtual gateway-service for NordVPN, ProtonVPN and N2N networking.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nethub

release platform vpns

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

GUI

Architecture

  • ❗ 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.

Edge Service Diagram

Click the diagram to enlarge it. Edge Diagram

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.


VPN Service Diagram

Click the diagram to enlarge it. VPN Diagram

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.


Installation

Warning: the installation of Nethub will make critical changes to your device. Make sure you know what you are doing.

Prerequisites

Steps

  1. Download N2N:
  2. Download Nethub.
  3. Run sudo dpkg -i n2n_<version>_amd64.deb.
  4. Run sudo apt-get install ./nethub_<version>_amd64.deb.
    1. Select YES when asked to save IPv4 and IPv6 tables.
    2. Enter the name of your WAN interface.
    3. Enter the name of your LAN interface.
  5. Reboot: sudo shutdown -r now.

Quickstart

For the complete manual use man nethub or nethub --help.

  1. Download OVPN files.
    # Download NordVPN servers automatically.
    # ProtonVPN servers have to be downloaded manually as instructed from nethub download.
    nethub download
  2. Set credentials.
    # Set credentials and server for ProtonVPN.
    nethub set proton --username ... --password ...
    # Set credentials and server for NordVPN.
    nethub set nord --username ... --password ...
  3. Connect.
    # Connect to NordVPN
    nethub connect nord --country us
    # Re-connect to ProtonVPN
    nethub connect proton --country nl
  4. 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"
    }
    -----------------------------------------------------------

Tests

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

Edges

In order to get new devices or servers into the N2N P2P network without installing or connecting to a Nethub VM follow these steps:

  1. Download and install N2N.
  2. Copy the configured nethub.conf file to the target server.
  3. Copy the nethub_edge script to the target server.
  4. Copy the libraries folder for the exceptions.sh.
  5. Invoke sudo ./nethub_edge or create an edge.

About

Nethub is a virtual gateway-service for NordVPN, ProtonVPN and N2N networking.

License:MIT License


Languages

Language:Shell 97.2%Language:Python 2.8%