Current location - Quotes Website - Team slogan - What command can I use under linux to see which ports iptables has opened?
What command can I use under linux to see which ports iptables has opened?
1, iptables is the CentOSX version of the packet filtering firewall program. To check whether the IPTABLES firewall is started, use "serviceiptablesstatus", and to start the iptables firewall, use "serviceiptablesstart", change start to stop, and change start to restart.

2. In Linux system, you can use the sudoiptables command to open the port. Here is a simple example. Suppose we want to open port 8080 to all network access: first, log in to Linux system.

3. It seems that there are two main ways to open ports under ubuntu. One is ubuntu's own firewall, and the other is iptables. We mainly use iptables here. In general, iptables will be installed when ubuntu is installed, and there is no problem. You can install it with a command.

4.iptables-a output-ptcp-dport port number -jDROP Open port number: iptables-a input-ptcp-dport port number -jACCEPT The following is how to use the linux open port command.