RHEL9: iptables 兼容rule

文章目录

担心

在RHELi9上,这个iptables命令是这样的。最后是使用iptables-nft里的一个命令。但是还好,可以兼容之前的iptables rule的操作。所以没有必要担心不兼容的问题。只是脚本可能有些更改。

iptables命令的位置

bash 复制代码
(root@us-rhel9):/root
$ ll /usr/sbin/iptables
lrwxrwxrwx 1 root root 26 Nov  6 05:46 /usr/sbin/iptables -> /etc/alternatives/iptables
(root@us-rhel9):/root
$ ll /etc/alternatives/iptables
lrwxrwxrwx 1 root root 22 Nov  6 05:46 /etc/alternatives/iptables -> /usr/sbin/iptables-nft
(root@us-rhel9):/root
$ ll /usr/sbin/iptables-nft
lrwxrwxrwx 1 root root 17 Dec 23  2024 /usr/sbin/iptables-nft -> xtables-nft-multi
(root@us-rhel9):/root
$ ll /usr/sbin/xtables-nft-multi
-rwxr-xr-x 1 root root 236960 Dec 23  2024 /usr/sbin/xtables-nft-multi
(root@us-rhel9):/root
$ rpm -qf /usr/sbin/xtables-nft-multi
iptables-nft-1.8.10-11.el9_5.x86_64

兼容之前的rule

bash 复制代码
(root@us-rhel9):/root
$ iptables -A INPUT --source 10.87.51.2 --destination 10.87.51.10 -p tcp --sport 5060 -m string --algo bm --string "407 Proxy" -j DROP
(root@us-rhel9):/root
$ iptables -D INPUT --source 10.87.51.2 --destination 10.87.51.10 -p tcp --sport 5060 -m string --algo bm --string "407 Proxy" -j DROP
(root@us-rhel9):/root
相关推荐
robur6 天前
H3C V7路由器升级软件时提示无足够存储空间
网络·路由器·升级·h3c
SunnyJim2 个月前
k8s NodePort 类型 Service 无法访问 plugin type=“flannel“ failed (add)
iptables·kubernetes·metrics·flannel·cni
SunkingYang2 个月前
如果只是常规使用的话,iPhone16 Pro Max有必要升级iPhone 17 Pro Max吗,二者之间有哪些区别?
升级·区别·对比·iphone 16·iphone 17·必要
问道飞鱼2 个月前
【前端知识】npm依赖升级以及冲突解决
前端·arcgis·npm·升级·冲突解决
半路_出家ren2 个月前
IPTables防火墙
服务器·网络·iptables
挨踢攻城2 个月前
Linux 安全 | 使用 iptables 测量流量
linux·服务器·安全·iptables·linux安全·厦门微思网络·测量流量
挨踢攻城2 个月前
Linux安全 | 防火墙工具 iptables 详解
linux·安全·iptables·rhce·rhca·厦门微思网络·linux防火墙工具
handsome123453 个月前
exsi 6.7 打补丁
安全·升级·补丁·exsi·exsi6.7
骐骥13 个月前
2025-09-08升级问题记录:app提示“此应用专为旧版Android打造..”或“此应用与最新版 Android 不兼容”
android·升级·不兼容·target sdk·专为旧版 android 系统