• centos7 firewall 一些用法


    [5]For exmaple, Configure that outgoing packets through the Server from Internal network(10.0.0.0/24) are allowed and forwarded to External side.

    # set masquerading to internal zone
    [root@dlp ~]# firewall-cmd --zone=internal --add-masquerade --permanent
    success
    [root@dlp ~]# firewall-cmd --reload
    success
    [root@dlp ~]# firewall-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -o eth1 -j MASQUERADE
    [root@dlp ~]# firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth0 -o eth1 -j ACCEPT
    [root@dlp ~]# firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT

    For example, Configure that incoming packets come to 22 port of External zone are forwarded to another Host(192.168.0.31) of 22 port

    firewall-cmd --zone=external --add-forward-port=port=22:proto=tcp:toport=22:toaddr=192.168.0.31
  • 相关阅读:
    化了妆的祝福 4
    桥牌感悟 2
    关于送礼
    东京disney sea流水账 1
    东京disney sea流水账 3
    晕倒的候任日本驻华大使
    一饮一啄
    就算神游 之二:行路 4
    关于送礼续
    桥牌感悟 3
  • 原文地址:https://www.cnblogs.com/zhenfei/p/12578893.html
Copyright © 2020-2023  润新知