If centos7 iptables cannot save the forwarding rules, the restart will be gone.

question 1: obviously, when you install IPtable, query, you are prompted not to install
question 2: Baidu said that you still need to install iptable-service, if you are uneasy, how to keep the rules saved after IPtable restart?
Please forgive me if you ask a question that is not an expert.

[root@VM_88_10_centos ~]-sharp systemctl status iptables Unit
Unit iptables.service could not be found.

[root@VM_88_10_centos ~]-sharp yum install iptables
Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile
Package iptables-1.4.21-24.1.el7_5.x86_64 already installed and latest version Nothing to do

< H2 > but the iptables-t nat-L command can be used < / H2 >
[root@VM_88_10_centos ~]-sharp iptables-t nat-L
Chain PREROUTING (policy
ACCEPT) target prot opt source destination

Chain INPUT (policy ACCEPT) target prot opt source
destination

Chain OUTPUT (policy ACCEPT) target prot opt source
destination

Chain POSTROUTING (policy ACCEPT) target prot opt source
destination

< H2 > then save the forwarding rules < / H2 >
[root@VM_88_10_centos ~]-sharp iptables-t nat-A POSTROUTING-s 192.168.0.0 MASQUERADE 24-o eth0-j MASQUERADE
< H2 > Save query and save normally < / H2 >
[root@VM_88_10_centos ~]-sharp iptables-t nat-L
Chain PREROUTING (policy ACCEPT) target
protopt source destination

Chain INPUT (policy ACCEPT) target protopt source
destination

Chain OUTPUT (policy ACCEPT) target prot opt source
destination

Chain POSTROUTING (policy ACCEPT) target prot opt source
destination MASQUERADE all-- 192.168.0.0According 24
anywhere

< H2 > after restart, there will be no query < / H2 >
[root@VM_88_10_centos ~]-sharp reboot [root@VM_88_10_centos ~]-sharp iptables-t
nat-L

Chain PREROUTING (policy ACCEPT) target prot opt source
destination

Chain INPUT (policy ACCEPT) target prot opt source
destination

Chain OUTPUT (policy ACCEPT) target prot opt source
destination


something you can easily find on Baidu. The
configuration has been added and naturally needs to be saved.
refer to http://www.cnblogs.com/jinjiy.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bebf75-31aa9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bebf75-31aa9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?