You are not logged in.

#1 2023-04-18 02:11:20

Sora0
Member
Registered: 2023-04-18
Posts: 2

netcat listener Error: Couldn't setup listening socket (err=-3)

when I try to setup normal net cat listener via this command

nc -lvnp 87

it gives this error msg

Error: Couldn't setup listening socket (err=-3)

when i use port 1234 or run it as sudo it just hangs with no response

Offline

#2 2023-04-18 03:07:14

mpan
Member
Registered: 2012-08-01
Posts: 1,367
Website

Re: netcat listener Error: Couldn't setup listening socket (err=-3)

To listen on ports below 1024, the process must be run as root or have CAP_NET_BIND_SERVICE capability.

Last edited by mpan (2023-04-18 03:07:33)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2023-04-18 06:54:40

seth
Member
Registered: 2012-09-03
Posts: 60,793

Re: netcat listener Error: Couldn't setup listening socket (err=-3)

when i use port 1234 or run it as sudo it just hangs with no response

… or maybe, just maybe, it's listening on the port… roll

Offline

#4 2023-04-18 20:54:10

Sora0
Member
Registered: 2023-04-18
Posts: 2

Re: netcat listener Error: Couldn't setup listening socket (err=-3)

mpan wrote:

To listen on ports below 1024, the process must be run as root or have CAP_NET_BIND_SERVICE capability.

when i run it with root it just appears like this:



https://imgur.com/a/7J3agSI

and i am sure no other service is listening to this port

Last edited by Sora0 (2023-04-18 20:55:25)

Offline

#5 2023-04-18 20:58:55

seth
Member
Registered: 2012-09-03
Posts: 60,793

Re: netcat listener Error: Couldn't setup listening socket (err=-3)

Do you understand what netcat is and does?

Open two terminals, in one run

netcat -lp 1234

and in the other

echo snafu | netcat localhost 1234

Offline

Board footer

Powered by FluxBB