mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-30 09:16:58 +02:00
854 B
854 B
n2n
n2n is a layer-two peer-to-peer virtual private network (VPN) which allows users to exploit features typical of P2P applications at network instead of application level.
.............VPN................
+------LAN-+-----+ +- Edge.
| . | / .
| Client ->.Edge +-> Supernode <-+- Edge .
| . | \ .
+----------+-----+ +- Edge.
................................
Supernode (1.2.3.4)
$ docker-compose up -d supernode
Edge (192.168.1.23)
$ docker-compose up -d edge
$ sysctl -w net.ipv4.ip_forward=1
$ iptables -t nat -A POSTROUTING -o n2n0 -j MASQUERADE
Client (192.168.1.45)
$ ip route add 192.168.100.0/24 via 192.168.1.23