首页 iptables教程nft实战-迁移iptables规则到nft

nft实战-nft备份还原

iptables实战练习

运维派隶属马哥教育旗下专业运维社区,是国内成立最早的IT运维技术社区,欢迎关注公众号:yunweipai
领取学习更多免费Linux云计算、Python、Docker、K8s教程关注公众号:马哥linux运维

迁移iptables规则到nft
  1. To save the existing rules to a file, run below command:
# iptables-save > rules.iptables
  1. Move the step1 file to CentOS/RHEL 8 Server via scp or ftp. You can use vi editor as well to copy the content from CentOS/RHEL 6 or 7 machine.
  2. Run the below command to generate the nft rules file on CentOS/RHEL 8 with iptables rules file.
# iptables-restore-translate -f rules.iptables > rules.nft
  1. Load the rules in CentOS/RHEL 8 machine, make sure nftables service is running on the system.
# nft -f rules.nft     ### load the rule via nft to nftables.
  1. To Display rule in CentOS/RHEL 8 Server .
# nft list ruleset

You can see the rules have been migrated from CentOS/RHEL 6 or 7 to CentOS/RHEL 8 server now and can test them as well

本文链接:https://www.yunweipai.com/35080.html

nft实战-nft备份还原

iptables实战练习

网友评论comments

发表回复

您的电子邮箱地址不会被公开。

暂无评论

Copyright © 2012-2022 YUNWEIPAI.COM - 运维派 京ICP备16064699号-6
扫二维码
扫二维码
返回顶部