NAT Traversal
Netmaker makes it easy to create secure, peer-to-peer networks over the internet — even when nodes are behind NAT (Network Address Translation). This guide walks you through ensuring that your VPN network is taking advantage of the NAT Traversal functionalities of Netmaker.
NAT (Network Address Translation) traversal is a technique that allows devices behind NAT firewalls to establish direct connections with each other or with devices on the public internet. Netmaker leverages WireGuard, STUN, and TURN servers to achieve this when direct connections aren't possible.
Assign a Failover Node
See this guide for instructions on how to set a device as a Failover Node.
Use [Relay] Gateways
See this guide for instructions on setting up a device as a [Relay] Gateway and assigning [Relay] Clients. You can assign as many Relay Gateways as needed.
Ensure STUN Servers are Running
As of v0.18.0, Netmaker uses a STUN server (Session Traversal Utilities for NAT). STUN helps communications protocols detect and traverse NATs that are between two endpoints. By default, Netmaker uses publicly available STUN servers. You may set up your own STUN servers to augment or replace the public ones by updating the STUN_LIST to include the STUN servers you want to use.
Two resources for installing your own STUN/TURN server:
https://github.com/coturn/coturn
https://ourcodeworld.com/articles/read/1175/how-to-create-and-configure-your-own-stun-turn-server-with-coturn-in-ubuntu-18-04
https://cloudkul.com/blog/how-to-install-turn-stun-server-on-aws-ubuntu-20-04/
References and Other Sources
https://docs.netmaker.io/docs/how-to-guides/integrating-non-native-devices
https://docs.netmaker.io/docs/how-to-guides/how-to-setup-a-full-mesh-site-to-site-vpn-with-netmaker
https://docs.netmaker.io/docs/how-to-guides/stabilize-netclient-connections-behind-nat
https://docs.netmaker.io/docs/how-to-guides/securely-interconnecting-ec2-instances-across-private-amazon-vpc-subnets-using-netmaker
Was this helpful?