iptables:找不到指令

iptables:找不到指令

我正在嘗試學習一些iptables東西,但似乎我沒有在 16.04 Ubuntu 上安裝它。

mypc@ubuntu:~$ iptables
-bash: iptables: command not found

如何解決這個問題?

答案1

iptables需要root權限。看起來您正在嘗試以普通用戶身份執行它。

所以:sudo iptables

另外,檢查核心中是否載入了 iptables:

lsmod | grep ip_tables

相關內容