a n2n supernode and edge executer based on alpine slimmer to 20mb
5.6K
n2n allow you create a peer to peer network convenient.
to see more about it please visit to https://github.com/ntop/n2n.
firstly, you need a public network server to use n2n supernode do peer's connect.
docker run --rm --name n2n -dit -p 7654:7654/udp -p 7654:7654/tcp theanony/n2n:3.0 supernode -f -F p2p -p 7654
docker run --rm --name n2n --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun -dit theanony/n2n:3.0 edge -c community -l serverHost:7654 -f
# must add `--cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun` to the `docker run`, the tun module was required for n2n edge
show the peer ip
docker exec -it n2n ip addr | grep -oP "(?<=inet\s)\d+(\.\d+){3}(?=.+?edge)"
and you can use iptables to forward port to another node in the local network
Content type
Image
Digest
sha256:124423a68…
Size
7.3 MB
Last updated
over 3 years ago
docker pull theanony/n2n:3.0