0

The ports isn't being display when I run netstat

 netstat -nal | grep 2237

tcping does show that the port is open

C:\Users\slee>tcping 172.29.69.250 2237
Probing 172.29.69.250:2237/tcp - Port is open - time=17.483ms
Probing 172.29.69.250:2237/tcp - Port is open - time=16.420ms

There quite a number of network aliases (69 of them) on this server:

eth4
eth4:1 
eth4:2   
...
eth4:69    
4
  • If the destination is DNAT-ed and routed, then the host won't have this socket resource itself, just as a router. This can happen for example when there is VM or container technology running.
    – A.B
    Nov 25, 2022 at 7:53
  • I did an ifconfig and there is no network aliases for 172.29.69.250 and iptables has no rules. I did a yum list installed and grep for docker and lxc but nothing appeared. Where would this IP be on this system? It is a CentOS 6 server.
    – supmethods
    Nov 25, 2022 at 12:00
  • That was a comment due to lack of information. With what you added in this comment, you can forget my former comment, that's not it.
    – A.B
    Nov 25, 2022 at 12:39
  • The netstat man page states that the utility is obsolete and one should use ss instead.
    – doneal24
    Nov 28, 2022 at 14:47

3 Answers 3

1

use -t option for TCP ports as described by Geek above or you can use ss utilty

ss -ltnu | grep -i 2237
1

You can easily get all the ip addresses of you box with ip addr or ifconfig command in Linux.

If you can not get that ip address in your box, that means it might use some other technology. It is out of your server. You can not find it on your server.

There are different ways which get this like network NAT on firewall, server virtualization etc.

You can run dmidecode command to check which virtualization your server is using.

For example, in openstack, you can add a public ip address from openstack console. You can login this server with this public ip address with ssh but when you run ip addr command in server, you can only see a private ip address.

I think it might be your case.

but there should be a connection between local and your server. The port might be different with this port.

2
  • The question was about finding open ports and the commands given show the OP knows the IP address of the server. I don't see how this answer contributes to the question asked.
    – doneal24
    Nov 27, 2022 at 20:31
  • we need check why the ip address was not running on the server side first.
    – workharder
    Nov 28, 2022 at 4:43
0

Can you used netstat -tlnp | grep -i "port_no".

t- TCP l- listening p- port n- not listening.

1
  • The netstat man page states that the utility is obsolete and one should use ss instead. The equivalent command when using ss has already been given as an answer.
    – doneal24
    Nov 27, 2022 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .