您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
IP地址伪装(masquerade)
firewall-cmd [--permanent] [--zone= zone] --add-masquerade [--timeout seconds]
//--timeout=seconds:在一段时间后自动删除该功能
firewall-cmd [--permanent] [--zone= zone] --remove-masquerade
firewall-cmd [--permanent] [--zone=zone] --query-masquerade
firewall-cmd [--permanent] [--zone=zone] --list-forward-ports
firewall-cmd [--permanent] [--zone=zone] --add-forward-port=port=portid[-portid]:proto=protocol[:toport-portid[-portid]][:toaddr-address[/mask]][--timeout=seconds]
firewall-cmd [--permanent] [--zone=zone] --remove-forward-port=port=portid[-portid]:proto=protocol[:toport=portid[-portid]][:toaddr=address[/mask]]
firewall-cmd [--permanent] [--zone=zone] --query-forward-port-port-portid[-portid]:proto=protocol[:toport-portid[-portid]][:toaddr=address[/mask]]
irewall-cmd --direct --add-rule ipv4 filter IN work_ allow 0 -p tcp --dport 9000 j ACCEPT
firewall-cmd --direct --get-all-rules
ipv4 filter IN_ work _allow 0 -p tcp --dport 9000 -j ACCEPT
rule [family="<rule family>"]
[ source address="<address>" [invert "True"] ]
[ destination address="<address>" [invert="True"] ]
[ <element> ]
[ log [prefix="<prefix text>"] [level="<log level>"] [limit value="rate/duration"] ]
[ audit ]
[ acceptlrejectldrop ]
选项 | 说明 |
---|---|
-add-rich-rule= 'RULE' | 向指定区域中添加RULE,如果没有指定区域,则为默认区域 |
--remove-rich-rule= 'RULE' | 从指定区域中删除RULE,如果没有指定区域,则为默认区域 |
--query-rich-rule= 'RULE' | 查询RULE是否已添加到指定区域,如果未指定区域,则为默认区域。<br/>规则存在,则返回0,否则返回1 |
--list-rich-rules | 输出指定区域的所有富规则,如果未指定区域,则为默认区域 |
firewall-cmd --permanent --zone=work --add-rich-rule='rule family=ipv4 source address=192.168.8.101/32 reject'
firewall-cmd --permanent --one=work --add-rich-rule='rule family=ipv4 source address=192.168.1.0/24 port port=8000-9000 protocol=tcp accept'
firewall-cmd --permanent --add-rich-rule='rule protocol value=icmp drop'
firewall-cmd --add-rich-rule='rule family=ipv4 source address=192.168.8.1/32 service name="http" log level=notice prefix= "NEW HTTP”limit value "3/s" accept'
Apr 16 17:09:55 Server kernel: NEW HTTP IN=ens33 OUT=
MAC=00:0c:29:69:01:c4:00:50:56:c0:00:08:08:00 SRC=192.168.8.1 DST=192.168.8.131
LEN=52 TOS=0xOO PREC=0x00 TTL =64 ID=20582 DF PROTO=TCP SPT=65289 DPT=80
WINDOW=8192 RES=0x00 SYN URGP=0
Apr 16 17:09:55 Server kernel: NEW HTTP IN=ens33 OUT=
MAC=00:0c:29:69:01:c4:00:50:56:c0:00:08:08:00 SRC=192.168.8.1 DST=192.168.8.131
LEN=52 TOS=0x0O PREC=0x0O TTL =64 ID=20590 DF PROTO=TCP SPT=65291 DPT=80
WINDOW=8192 RES=0x00 SYN URGP=0
Apr 16 17:09:55 Server kernel: NEW HTTP IN=ens33 OUT=
MAC=00:0c:29:69:01:c4:00:50:56:c0:00:08:08:00 SRC=192.168.8.1 DST=192.168.8.131
LEN=52 TOS=0x0O PREC=0x0O TTL =64 ID=20602 DF PROTO=TCP SPT=65292 DPT=80
WINDOW=8192 RES=0x00 SYN URGP=0
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。