zoukankan      html  css  js  c++  java
  • firewalled centos7

    zone绑定网卡

    firewall-cmd --zone=internal --add-interface=ens192 --permanent 

    firewall-cmd --permanent --zone=internal --add-rich-rule="rule family="ipv4" source address="192.168.10.0/24" accept"

    [root@byos000 system]# firewall-cmd --get-active-zones
    internal
    interfaces: ens192
    public
    interfaces: ens160

    [root@byos000 system]# firewall-cmd --permanent --zone=internal --add-rich-rule="rule family="ipv4" port protocol="tcp" port="123" accept"
    success
    You have mail in /var/spool/mail/root
    [root@byos000 system]# firewall-cmd --permanent --zone=internal --add-rich-rule="rule family="ipv4" port protocol="udp" port="123" accept"
    success
    [root@byos000 system]# firewall-cmd --reload
    success

    firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.10.0/24" accept"

    添加一个网段内网互通

    firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="106.39.102.1xx" port protocol="tcp" port="9100-9200" accept"

    添加一个ip开放某个端口范围

    最后规则生效

    firewall-cmd --reload

  • 相关阅读:
    zyUpload+struct2完成文件上传
    js表单动态添加数据并提交
    Hibernate注解
    ueditor的配置和使用
    设计模式
    静态Include和动态Include测试并总结
    java笔试题
    perf使用示例1
    perf 简介
    ss简单使用
  • 原文地址:https://www.cnblogs.com/gaoyuechen/p/9486911.html
Copyright © 2011-2022 走看看