On my server, I have saved the rules to allow port 7890 persistently using the iptables-persistent package. Upon reboot, nmap localhost -p 7890 shows that the port is closed. I then run your mentioned nc command with &.
nmap shows that the port is open but with no service. Let's call this step y.
On my local machine, I try to connect telnet my server but it simply times out.
Just an FYI: I have rechecked that the IP address is correct.
What I am confused is that in step y, shouldn't a service be listed too, as nc is running in the background and listening to port 7890? If you check port 80 with the same command, you would see http as the service listening to port 80.
Code:
$ nc -k -l 7890 &
Code:
nmap localhost -p 7890Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-25 13:27 UTCNmap scan report for localhost (127.0.0.1)Host is up (0.000099s latency).Other addresses for localhost (not scanned): ::1PORT STATE SERVICE7890/tcp open unknownNmap done: 1 IP address (1 host up) scanned in 0.04 seconds
Code:
$ telnet xxx.xx.xx.xx 7890Trying xxx.xx.xx.xx...telnet: Unable to connect to remote host: Connection timed out
What I am confused is that in step y, shouldn't a service be listed too, as nc is running in the background and listening to port 7890? If you check port 80 with the same command, you would see http as the service listening to port 80.
Statistics: Posted by debber — 2024-07-25 13:29 — Replies 4 — Views 100