When you are the Linux administrator or system administrator, you should aware about the process that causing your server network connections. This could be helpful in case of any server level troubleshoot. In Unix-like systems, you can monitor the inbound and outbound network connections using the command
openstat. This command line is really very helpful when you are troubleshooting network related issues on your servers. Also, this command is available with many options in order to easier the process, i.e we can use this command to listen the incoming TCP and UDP connections, outgoing TCP and UDP connections, to list all other UNIX connections, etc.
Before executing all the below commands, you should ensure that root access of your server, i.e you should log in as a root user to run this commands
Command to listen to all ongoing network connections including TCP, UDP and Unix connections,
The above command will produce the output of all the network connections with its address and state.
Command to listening TCP Ports connections only,
Command to listening UDP Ports connections only,
We can also list the listening ports using this netstats command line, command to list all the listening port is
Command to list all the listening TCP Ports connections only,
Command to list all the listening UDP Ports connections only,