iptables备份和恢复配置

[root@hostname ~]# iptables-save > /usr/myipt.rule   #备份规则至/usr/myipt.rule
[root@hostname ~]# iptables -F   #删除规则
[root@hostname ~]# iptables -nvL
[root@hostname ~]# iptables-restore < /usr/myipt.rule #恢复规则
[root@hostname ~]# iptables -nvL

posted @ 2023-04-13 21:06  Sureing  阅读(125)  评论(0编辑  收藏  举报