redhat防火墙管理

systemctl status firewalld
systemctl stop firewalld
systemctl start firewalld
systemctl enable firewalld
systemctl disable firewalld

查看当前iptables规则
iptables –L –n

添加指定端口到防火墙中
iptables -I INPUT -p udp --dport 161 -j ACCEPT
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

查看规则序号
iptables -L -n --line-number
删除INPUT规则
iptables -D INPUT 编号

其他命令:
1.查看端口占用
lsof -i:端口号

2.修改ip
ifconfig enp2s0f0 10.0.96.85
ifconfig enp2s0f0 10.0.96.87

转载于:https://www.cnblogs.com/cloudwind2011/p/9371787.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值