uname -r:4.13.0-16-generic(ubuntu 17.10 服务器)
我遇到一个问题,重启后 iptables 不起作用:
iptables-apply /etc/network/iptables
[ ok ] Stopping fail2ban (via systemctl): fail2ban.service.
Applying new iptables rules from '/etc/network/iptables'... modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.13.0-16-generic
iptables-restore v1.6.1: iptables-restore: unable to initialize table 'filter'
Error occurred at line: 3
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
failed.
Error: unknown error applying new iptables rules: /etc/network/iptables
Reverting to old iptables rules... done.
Run Code Online (Sandbox Code Playgroud)
我尝试重新安装内核和 iptables:
apt install --reinstall linux-generic linux-image-4.13.0-16-generic linux-image-extra-4.13.0-16-generic linux-headers-4.13.0-16-generic iptables
Run Code Online (Sandbox Code Playgroud)
当我重新安装它(无需重新启动)时,iptables …