I need to use nc -lp4 5432 --allow 192.168.1.24 but I have a previous nc directive that only has it listening on localhost. It throws an error when I try overwriting it:
$ nc -lp4 5432 --allow 192.168.1.24
Ncat: Got more than one port specification: 4 5432. QUITTING.
How can I overwrite the previous instruction, or delete that listener? I've had a look around and I can't find how to get this removed.
[Mon Jul 11 02:17:11 root@server_n ~] nc -l -p 5432 --allow 192.168.1.24 Ncat: bind to :::5432: Address already in use. QUITTING.Theportseems already bound. – Rich_F Jul 11 '22 at 06:18ncis a standalone process, not a command line interface for some "nc service" that could be reconfigured. – Kamil Maciorowski Jul 11 '22 at 06:44ncaccepts and processes exactly one connection, then it exits, it's by design. – Kamil Maciorowski Jul 11 '22 at 06:50listener. – Rich_F Jul 11 '22 at 06:51nc -k. Seeman 1 nc. – Kamil Maciorowski Jul 11 '22 at 06:55socat. See this and this. – Kamil Maciorowski Jul 11 '22 at 07:05postgresqlport alive and listening 24/7. I don't thinkncis an option. I'm sure there's a true way to get this to work. I will keepsocatin mind. – Rich_F Jul 11 '22 at 07:16