ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.18k stars 930 forks source link

Supernode how to lisen/bind special ip address like localhost #1015

Closed Eloco closed 2 years ago

Eloco commented 2 years ago
Welcome to n2n v.3.0.0.r1038.d2683f2 for Debian bullseye/sid

❯ sudo supernode -h | grep host
 options for under-        [-l <supernode host:port>]

❯ sudo supernode -l localhost:7777
❯ sudo lsof -i -n | egrep 'COMMAND|LISTEN|UDP|TCP' | grep super ;sudo pkill -f super
supernode 80291             n2n    4u  IPv4 356559      0t0  UDP *:7654
supernode 80291             n2n    5u  IPv4 356560      0t0  TCP *:7654 (LISTEN)
supernode 80291             n2n    6u  IPv4 356561      0t0  UDP 127.0.0.1:5645

i want to bind the address to localhost or other typical ip, but -l param not work

Logan007 commented 2 years ago

Hello,

While egde supports an enhanced -p [<ip address>:]<port> syntax with optional IP address of some local interface to specify interface and port to bind to, the supernode only supports choice of port, i.e. -p <port> so far. But I think it would make a nice and useful enhancement porting this from edge over to supernode as well. I will add it to the list, thanks for this idea!

By the way, -l is not for listen, it is for link to other supernodes and provides addresses of other supernodes to connect to, see doc/Federation.md.

Logan007 commented 2 years ago

Added with #1016.