New centosiptables rules are automatically saved

Source: Internet
Author: User
The new centosiptables rule automatically saves www.2cto. com1. redirection for example I want to add an ip to prohibit access # Disable all ports/sbin/iptables-IINPUT-s5.39.67.46-pTCP-jDROP # Disable port 80/sbin/iptables-IINPUT... the new centos iptables rule automatically saves www.2cto.com 1. redirection for example, I want to add an ip address to prohibit access # Disable all ports/sbin/iptables-I input-s 5.39.67.46-p TCP-j DROP # Disable port 80/sbin/iptables-I INPUT -s 183.2.145.98-p TCP-dport 80-j DROP1.2. redirect save/sbin/iptables-save | cat>/etc/sysconfig/iptables1.3. restart service iptables restart; www.2cto.com 2. modify the configuration file/etc/sysconfig/iptables-config and change "no" in the "IPTABLES_SAVE_ON_STOP = no" statement to "yes" # Disable all ports/sbin/iptables-I INPUT- s 5.39.67.46-p TCP-j DROP # Disable port 80/sbin/iptables-I INPUT-s 183.2.145.98-p TCP-dport 80-j DROPservice iptables restart; in this way, the existing rules are automatically saved in the file/etc/sysconfig/iptables before the service is stopped.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.