Operating System - Linux
1825720 Members
3167 Online
109686 Solutions
New Discussion

How to cheak network users ip.which are access my server ports.

 
aamir4u
Regular Advisor

How to cheak network users ip.which are access my server ports.

 

Hello.

 

How to cheak network users ip.which are access my server ports.

And Is any command to cheak .What are network users doing and ip.

which are connected my network either is windows client or linux or hp ux.

Thanks
aamir uddin
1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: How to cheak network users ip.which are access my server ports.

If you want to see connections to a particular TCP or UDP port:

lsof -i tcp:<port_number>
# or
lsof -i udp:<port_number>

Example:

# lsof -i tcp:22
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    4814 root    3u  IPv4   9115      0t0  TCP *:ssh (LISTEN)
sshd    4814 root    4u  IPv6   9117      0t0  TCP *:ssh (LISTEN)

 ... looks like sshd is listening for incoming connections for both IPv4 and IPv6, but there are no incoming connections at this time.

 

 

If you want to see all connections on the system, use "netstat". For example, "netstat -anAinet -p" might be a good set of options for Linux netstat. (The command "man netstat" will show you a description of options.)

 

MK