iptables
iptables
2023-09-27 14:20:25 时间
1 -A INPUT -m state --state NEW -m tcp -p tcp --dport 8888 -j ACCEPT
-A INPUT是说,将后面的这个rule加入INPUT chain;
-m state是让内核加载state模块;
-m tcp是让内核加载tcp模块;
--state NEW是state模块提供的选项,用于指定作用的packet为创建新的连接的package;
-p tcp --dport 8888是tcp模块提供的选项,用于指定作用的packet的目的端口为8888;
-j ACCEPT 是说允许这样的包通过。
2 iptables默认的规则链
2.1 INPUT
从网络进入服务器的数据包就走这个链。
2.2 OUTPUT
从服务器出去的数据包走这个链。
2.3 FORWARD
经由该服务器路由的包走这个链。
相关文章
- (转)CentOS6 iptables 记录指定IP的网络访问日志
- iptables如何删除一条规则?
- 1.防火墙(iptables)
- iptables 网址转译 (Network address translation,NAT)
- 解决service iptables save出错please try to use systemctl
- iptables作为路由转发至后端web服务器
- iptables中DNAT、SNAT和MASQUERADE的理解
- iptables阻止服务器被攻击
- 使用 iptables 限制每个 IP 地址的最大连接数和每秒新连接数
- How to allow/block PING on Linux server – IPTables rules for icmp---reference
- 细说firewalld和iptables