首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从ubuntu 12.04迁移到18.04 iptables导出错误

从ubuntu 12.04迁移到18.04 iptables导出错误
EN

Server Fault用户
提问于 2020-03-04 09:11:34
回答 1查看 113关注 0票数 0

我有一个老的12.04服务器,它具有以下iptables规则:

代码语言:javascript
复制
Chain NAME (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:discard /* someservice */
ACCEPT     udp  --  anywhere             anywhere             udp dpt:port /* someservices */
ACCEPT     tcp  --  private-ip           anywhere             tcp dpt:domain
ACCEPT     tcp  --  private-ip           anywhere             tcp dpt:service /* service server */

Chain NAME2 (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:port
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:tftp
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https

Chain OTHERNAME (1 references)
target     prot opt source               destination         
DROP       all  --  public-ip            anywhere            
DROP       all  --  public-ip            anywhere            
DROP       all  --  public-ip            anywhere            
RETURN     all  --  anywhere             anywhere

这只是一个例子,有很多规则。我试图通过启动一个新的18.04VM来迁移服务器。除了iptable之外,我能够正确地传输所有的东西。当我做‘’iptables还原

我尝试从导出文件中手动输入命令,但是我得到:

代码语言:javascript
复制
iptables: No chain/target/match by that name.
or
iptables v1.6.1: Couldn't load target `OTHERNAME':No such file or directory

我在新服务器上添加了这些链名。旧的iptables版本是1.4.12。我也试过iptables转换器,但没什么用。

如果最终我无法添加那些iptables规则,那么使用ufw命令这些规则会是什么样的呢?

EN

回答 1

Server Fault用户

发布于 2020-03-04 14:41:01

解决了。我刚刚重新启动了VM,所以它升级了内核,现在的iptable恢复工作了。谢谢你们所有人。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1005522

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档