Iptables (4) Rule writing

Source: Internet
Author: User

/etc/sysconfig/iptables

# Generated by Iptables-save v1.4.7 on Tue Mar 20 15:05:33 2018
*filter
: INPUT DROP [1668:74,260]
: FORWARD DROP [0:0]
: OUTPUT DROP [48:2,388]
-A input-p tcp-m tcp--sport 3306-j ACCEPT
-A input-s 123.249.24.233/32-j DROP
-A input-p tcp-m tcp--dport 7272-j ACCEPT
-A input-p icmp-j ACCEPT
-A input-i lo-j ACCEPT
-A input-p udp-m UDP--dport 8000-j ACCEPT
-A input-p tcp-m tcp--dport 80:99-j ACCEPT
-A input-p tcp-m tcp--dport 8020-j ACCEPT
-A input-p tcp-m tcp--dport 8085-j ACCEPT
-A input-p tcp-m tcp--dport 8086-j ACCEPT
-A input-p tcp-m tcp--dport 3306-j ACCEPT
-A input-p tcp-m tcp--dport 8080-j ACCEPT
-A input-p tcp-m tcp--dport 21-j ACCEPT
-A input-p tcp-m tcp--dport 30001:31000-j ACCEPT
-A input-s 218.80.218.146/32-p tcp-m tcp--dport 8019-j ACCEPT
-A input-s 115.29.32.93/32-p tcp-m tcp--dport 8019-j ACCEPT
-A input-p tcp-m tcp--dport 8008-j ACCEPT
-A input-p tcp-m tcp--dport 8001-j ACCEPT
-A input-p tcp-m tcp--dport 6379-j ACCEPT
-A input-p udp-m UDP--sport 8000-j ACCEPT
-A input-p udp-m UDP--sport 53-j ACCEPT
-A input-p tcp-m tcp--sport 80-j ACCEPT
-A input-p tcp-m tcp--sport 8020-j ACCEPT
-A input-p tcp-m tcp--sport 8080-j ACCEPT
-A input-p tcp-m tcp--sport 8085-j ACCEPT
-A input-p tcp-m tcp--sport 8086-j ACCEPT
-A input-s 10.0.0.0/8-j ACCEPT
-A input-p tcp-m tcp--sport 7272-j ACCEPT
-A input-p tcp-m tcp--sport 1521-j ACCEPT
-A input-p tcp-m tcp--sport 5672-j ACCEPT
-A input-p tcp-m tcp--sport 8093-j ACCEPT
-A input-p tcp-m tcp--sport 90-j ACCEPT
-A input-p tcp-m tcp--sport 8981-j ACCEPT
-A input-p tcp-m tcp--sport 6379-j ACCEPT
-A input-m state--state related,established-j ACCEPT
-A output-p tcp-m tcp--dport 3306-j ACCEPT
-A output-d 123.249.24.233/32-j DROP
-A output-p tcp-m tcp--sport 7272-j ACCEPT
-A output-p icmp-j ACCEPT
-A output-o lo-j ACCEPT
-A output-p udp-m UDP--sport 8000-j ACCEPT
-A output-p tcp-m tcp--sport 80:99-j ACCEPT
-A output-p tcp-m tcp--sport 8020-j ACCEPT
-A output-p tcp-m tcp--sport 3306-j ACCEPT
-A output-p tcp-m tcp--sport 8080-j ACCEPT
-A output-p tcp-m tcp--sport 8085-j ACCEPT
-A output-p tcp-m tcp--sport 8086-j ACCEPT
-A output-p tcp-m tcp--sport 21-j ACCEPT
-A output-p tcp-m tcp--sport 30001:31000-j ACCEPT
-A output-p tcp-m tcp--sport 8019-j ACCEPT
-A output-p tcp-m tcp--sport 8008-j ACCEPT
-A output-p tcp-m tcp--sport 6379-j ACCEPT
-A output-p tcp-m tcp--dport 8001-j ACCEPT
-A output-p udp-m UDP--dport 8000-j ACCEPT
-A output-p udp-m UDP--dport 53-j ACCEPT
-A output-p tcp-m tcp--dport 80-j ACCEPT
-A output-p tcp-m tcp--dport 8020-j ACCEPT
-A output-p tcp-m tcp--dport 8080-j ACCEPT
-A output-p tcp-m tcp--dport 8085-j ACCEPT
-A output-p tcp-m tcp--dport 8086-j ACCEPT
-A output-d 10.0.0.0/8-j ACCEPT
-A output-p tcp-m tcp--dport 1521-j ACCEPT
-A output-p tcp-m tcp--dport 5672-j ACCEPT
-A output-p tcp-m tcp--dport 8093-j ACCEPT
-A output-p tcp-m tcp--dport 90-j ACCEPT
-A output-p tcp-m tcp--dport 465-j ACCEPT
-A output-p tcp-m tcp--dport 8981-j ACCEPT
-A output-p tcp-m tcp--dport 9001-j ACCEPT
-A output-p tcp-m tcp--dport 6379-j ACCEPT
-A output-p tcp-m tcp--dport 8761-j ACCEPT
-A output-p tcp-m tcp--dport 8083-j ACCEPT
-A output-p tcp-m tcp--dport 443-j ACCEPT
COMMIT
# completed on Tue Mar 20 15:05:33 2018

Iptables (4) Rule writing

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.