iptables备份和恢复配置

发布时间 2023-04-13 21:14:35作者: Sureing

[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