- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
加条iptables规则,我直接将原来的iptables规则的备份文件拖到windows下编辑,编辑完成后之后sftp传上去,接着用 iptables-restore < iptables-rules.bak 。结果iptables有如下报错,提示以下错误:
FATAL: Module ip_tables not found.
iptables-restore: unable to initialize table ‘security
Error occurred at line: 2
Try `iptables-restore -h’ or ‘iptables-restore –help’ for more information.
提示iptables某个表不能初始化。我看了第二行,还真没看出错误来。
分析过程:因为在使用iptables-restore命令前,还有一个完整的,好的iptables备份文件 iptables 。我试着将这个规则文件导入iptables就没有提示
FATAL: Module ip_tables not found.
: iptables-restore: unable to initialize table ‘security
Error occurred at line: 2
Try `iptables-restore -h’ or ‘iptables-restore –help’ for more information.
但是,一旦导入我这修改后的文件就提示报错。可是,肉眼真没看到哪有有语法上的或者单词上的错误。最后,只能猜测是下是不是文件格式不对。我将修改后的文件改成Unix格式,然后重新上传,导入,就没有任何问题了。成功解决报错。
还有可能就是你在windows下编辑的时候,多了很多其他的不必要的字符。所以,建议还是在linux下更改规则文件。
售前咨询
售后咨询
备案咨询
二维码
TOP