Open the iptables configuration file: vi /etc/sysconfig/iptables When modifying the CentOS firewall, be sure to leave a good path for yourself and leave a management for VNC. Port and SSh management port
The following is an example of iptables:
# Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp –icmp-type any -j ACCEPT -A RH-Firewall -1-INPUT -p 50 -j ACCEPT -A RH-Firewall-1-INPUT -p 51 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT -A RH- Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 53 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m udp -p udp –dport 53 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -m state – State NEW -m tcp -p tcp –dport 25 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT -A RH-Firewall- 1-INPUT -m state –state NEW -m tcp -p tcp –dport 443 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT –reject-with icmp-host-prohibited COMMIT
To modify the CentOS firewall, you need to be aware that you must modify this file according to your own server.
For example, if you don't want to open port 80 to provide web services, you should delete this line accordingly: -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p Tcp –dport 80 -j ACCEPT
Restart iptables after all modifications: service iptables restart
You can verify if the rules have taken effect: iptables -L
, we have completed the modification of the CentOS firewall settings.
After reinstalling Win7, I have never tried to install Linux again, occasionally playing, an
. Using a Linux terminal is more than just entering commands. After learning these basic techniques,
First, PCI bus system architecture PCI is the abbreviation of Peripheral Component Interco
The installation environment is Ubuntu13.10 version i386, the nginx server and mysql server have bee
Linux virtual machine three networking modes and remote login management
Inux virtual machine network configuration method and solution to the problem
Linux network card configuration detailed
How does the Linux system set up a shared file server? The
Detailed sort order command under Linux
Linux shared wifi to Android phone
Xinxing finishing Linux part of the commonly used command
The eight magical aspects of the win7 group policy
What should I do if the Win10 upgrade is slow?
Win10 Mobile 1st Anniversary Update Preview 14376 Known Issues Summary
How to solve the Win10 system click update and security flashback?
How does Win8 move to a folder on another drive after accessing the share?
Solve Windows XP system problems
What should I do if the hard disk is maliciously locked?
Virtualization disaster recovery eight questions and answers
How can I solve the problem that Win8 system can't install anti-virus software?
Experience the unique surfing skills of surf under the vista