linux防火墙开放端口

2024-11-25 09:19:32

1、以oracle的1521端口为例阻止所有服务器访问1521端口iptables -I INPUT -p tcp --dport 1521 -j DROP

2、放行172.17.79.4iptables -I INPUT -s 172.17.79.4 -p tcp --dport 1521 -j ACCEPT

3、保存配置service iptables save

4、重启防火墙service iptables restart

5、后续如果想继续添加ip,执行2、3、4步骤即可。

猜你喜欢