zoukankan      html  css  js  c++  java
  • linux下防火墙配置

    linux下防火墙配置:
    touch /etc/sysconfig/iptables

    拷贝如下内容至上面新建文件。

    # Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :FORWARD ACCEPT [0:0] :INPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] :OUTPUT ACCEPT [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 -p tcp -m state -m tcp --dport 22 --state NEW -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 62222 --state NEW -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 1521 --state NEW -j ACCEPT #-A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 1158 --state NEW -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 5901 --state NEW -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m state -m udp --dport 123 --state NEW -j ACCEPT #-A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 8080 --state NEW -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 10240:10260 --state NEW -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT
  • 相关阅读:
    3892: [Usaco2014 Dec]Marathon
    3891: [Usaco2014 Dec]Piggy Back
    2016: [Usaco2010]Chocolate Eating
    3016: [Usaco2012 Nov]Clumsy Cows
    3359: [Usaco2004 Jan]矩形
    1593: [Usaco2008 Feb]Hotel 旅馆
    关于ubuntu上无法运行cmd markdown
    Mininet实验 动态改变转发规则
    Mininet简单性能测试
    Mininet实验 基于Mininet测量路径的损耗率
  • 原文地址:https://www.cnblogs.com/taowang2016/p/2957818.html
Copyright © 2011-2022 走看看