Centos view port occupancy command. For example, to view port 80 occupancy, use the following command:
lsof -i tcp:80
list All ports
netstat -ntlp
1, open port (take port 80 as an example)
Method one:
/sbin/iptables -I INPUT -p tcp –dport 80 -j ACCEPT Write modification
/etc/init.d/iptables save Save changes
service iptables restart Restart the firewall, the changes take effect
Method 2:
vi /etc/sysconfig/iptables Open the configuration file and add the following statement:
-A INPUT -p tcp -m state –state NEW -m tcp –dport 80 - j ACCEPT Restart the firewall, modify the completion
2, close the port
Method one:
/sbin/iptables -I INPUT -p tcp –dport 80 -j DROP write Into the modification
/etc/init.d/iptables save Save changes
service iptables restart Restart the firewall, the changes take effect
Method 2:
vi /Etc/sysconfig/iptables Open the configuration file and add the following statement:
-A INPU T -p tcp -m state –state NEW -m tcp –dport 80 -j DROP Restart the firewall, modify the completion
3, view the port status
/etc/init.d/Iptables status
Too many open files Errors are common faults in Linux systems. Solutions can be easily found on the
Understanding the difference between common mode and differential mode signals is critical to unders
After linux rm deletes the file, recovery is more troublesome. Even if it is restored, the file na
view mysql default encoding format show variables like “character%”; If the reality-bash
Data transfer on the link layer of the linux protocol stack - data transmission
Use mutexes to control Linux thread synchronization
The basics of vsftp installation and configuration in CentOS
Solution for ‘./mysql-bin.index’ not found (Errcode: 13)
Overview of International Program Implementation Steps
Php+apache+mysql+worpress+linux platform build
Solution to common problems in Linux system
Linux terminal terminal commonly used shortcuts
The problem of creating DBCA error problem under Linux operating system
Thunder new function Tumblr picture introduction
Method for viewing chm files normally under Win8 system
Windows Server 2003 Enterprise Edition installation diagram
How can win7 computer save C disk space?
How to improve Win10 boot speed and speed up Win10 boot speed four ways
Win10 Start Menu Troubleshooter Release: Fix Start Menu Issue
In which folder is the cool dog MV download saved?
How does Win7 delete the network location of those unused network locations