How to check the status of open ports in suse?
On SUSE systems, there are several methods available to check the status of open ports.
- Use the netstat command: typing the following command in the terminal will display all the ports and their status information on the current system.
- Show me a list of all currently listening TCP and UDP connections.
- Explanation of parameters:
- -show only TCP ports
- -u: display only UDP ports
- -n: display the port number in numerical form.
- – Show only ports in listen state.
- To use the ss command: The ss command is a modern alternative to netstat and can also be used to view port information. Input the following command in the terminal:
- Show all TCP and UDP connections in numerical format.
- Explanation of parameters:
- – Display only TCP ports.
- -u: Display only UDP ports.
- – Display the port number in numerical form.
- Display only the ports in a listening state.
- To check the open ports on a system with the firewall enabled, use the firewall-cmd command in the terminal by inputting the following command.
- Show the list of ports in the public zone using firewall-cmd.
- This will list all the currently open ports in the firewall configuration.
Please note that the above methods may require root permission to be executed.