Requirements: The demo1 environment allows all access to the internal network, and only provides port 80 externally
To prevent the rule from being lost when restarting, add a save trigger script
Example firewall rules
I am used to modifying the firewall rules directly to modify the configuration file. The contents of the file are as follows:
Copy these contents to the empty file iptables.rules we created earlier
After adding the rules, you need to load the configuration
Chain FORWARD (policy ACCEPT) target prot opt source destination
Chain OUTPUT (policy ACCEPT) target prot opt source destination
Recommended Posts