In my computer with Ubuntu 14.04 I can do things like this:
$ nc -l 5349 -vvv Listening on [0.0.0.0] (family 0, port 5349)
$ nc -vvv -l 192.168.254.96 5349 Listening on [192.168.254.96] (family 0, port 5349)
And a socket is opened to listen entering connections on my local IP address (192.168.254.96). And obviously I can connect from the other side and transmit data.
But in a server behind a NAT with Debian 8.0 Jessie I got this strange error:
$ nc -vvv -l 5349 5349: inverse host lookup failed: Unknown host nnetfd reuseport failed : Protocol not available listening on [any] 38541 ... : Protocol not available
$ nc -vvv -l 10.1.6.189 5349 10.1.6.189: inverse host lookup failed: Unknown host nnetfd reuseport failed : Protocol not available listening on [any] 52606 ... : Protocol not available
The port is not in use:
$ ss -tnl | grep 5349 (empty)
and it is the correct IP address:
$ ip addr list ... 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 1e:89:93:f1:96:a4 brd ff:ff:ff:ff:ff:ff inet 10.1.6.189/19 brd 10.1.31.255 scope global eth0 inet6 fe80::1c89:93ff:fef1:96a4/64 scope link valid_lft forever preferred_lft forever
What could be the issue? Could be something related with the NAT behind the server is?