
我正在嘗試將 iptables 解決方法應用於以下情況CVE。提供的 iptables 指令
sudo iptables -A INPUT -p tcp -m tcpmss --mss 1:500 -j DROP
有效,但不幸的是我們正在使用ufw
,有沒有一種方法可以明確地將 iptables 命令轉換為功能正常的 ufw 命令,或者一種向 ufw 提供一次性 iptable 規則以便在系統重新啟動時保留的方法?
答案1
我的評論中的連結是正確的,我能夠將原始 iptables 規則添加到文件中,/etc/ufw/after.rules
如下所示:
# CVE-2019-11479
-A INPUT -p tcp -m tcpmss --mss 1:500 -j DROP
然後重新加載sudo ufw reload
我的 iptables 在它的列表中顯示了正確的規則
DROP tcp -- anywhere anywhere tcpmss match 1:500