Skip to main content

Connecting to the Internet

Overview

HyperPath allows nodes to access the internet through another node in their HyperNet that acts as a gateway. This configuration offers two significant advantages:

  • Link Bonding for Internet Access: Utilize HyperPath's multi-interface capability to improve internet connection reliability and throughput
  • VPN-like Privacy: The gateway node can mask your original IP address and location, providing enhanced privacy similar to a VPN

Gateway Configuration

To set up a HyperPath node as your internet gateway:

  1. Access the token settings for your HyperPath node
  2. Locate the Gateway parameter
  3. Select the name of the node you want to use as your internet gateway
  4. Save your configuration

Once configured, all internet-bound traffic from your node will be routed through the specified gateway node.

Image from Docusaurus page

IP Masquerading Requirements

For proper internet connectivity through a gateway node, IP Masquerading (MASQUERADE) must typically be enabled on the gateway. This process:

  • Dynamically translates the source IP address of outgoing packets to match the gateway's outgoing interface
  • Allows internet destinations to properly respond back to the gateway node
  • Enables the gateway to correctly route returning traffic back to the original node

Setting Up IP Masquerading

On most Linux systems, IP Masquerading is configured using the iptables command:

iptables -t nat -A POSTROUTING -o <OUTGOING_INTERFACE> -j MASQUERADE

Replace <OUTGOING_INTERFACE> with the name of the network interface on the gateway that connects to the internet (e.g., eth0, wlan0). OpenWRT Configuration

note

On OpenWRT systems, HyperPath automatically adds the necessary MASQUERADE rule to the firewall when it runs. You can verify the current firewall rules by executing:

iptables -t nat -L -n -v

This will display all Network Address Translation (NAT) rules currently active in the firewall.

Troubleshooting

If internet connectivity issues occur after configuration:

  1. Verify that the gateway node has active internet connectivity
  2. Check that IP Masquerading is properly configured on the gateway node
  3. Check that traffic forwarding is enabled on the system (sysctl net.ipv4.ip_forward should be set to 1)
  4. Ensure that any firewall rules on the gateway allow forwarded traffic