We can usually use iptables to set up some firewall rules in Linux systems.
Iptables-t nat-a output-p tcp-j REDIRECT * * * * * * * * * application, the rule is only saved in memory, and the next time it restarts, the/etc/sysconfig/iptables firewall configuration file is reloaded by default.
1. If you want to use the currently added rule after restarting, you can save the current rule to a configuration file by/sbin/service Iptables Save, which will perform the Iptables initialization script, and the script runs/sbin/ Iptables-save The program and updates the current iptables, and the original configuration file is saved as Iptables.save.
2. Generally we can specify the saved profile Iptables-save > config file name
Perform Iptables-restore < profile file name if you want to restore a configuration
3. After applying the iptables rule, you want to restore the local default rules, perform service iptables restart, and reload/etc/sysconfig/iptables files. (At this point it looks like Iptables-restore </etc/sysconfig/iptables doesn't work)