Today we will learn how to list services and open ports on Linux & more
List services with associated port the service is using
netstat -lntup
- - l is used to list listening socket
- - n is using to show port number
- - t to show tcp connexions
- - u to show udp connexions
- - p display programme name
Show ESTABLISHED connexions
netstat -natu | grep 'ESTABLISHED'
- - n is using to show port number
- - a display all sockets
- - t to show tcp connexions
- - u to show udp connexions
Show ESTABLISHED connexions with a specific IP address
netstat -natu | 'ESTABLISHED' | 141.103.61.80
Show routing informations
netstat -r
Continuous listening for services
netstat -lntupc
Signed Alix.