Example Service About Automatic Restoration of iptables
In some cases, we need to load iptables after everything has started. The following is an example of a service to accomplish this. The service starts when the server is idle, checks for the executable file, and then starts it. [Unit] Description=runs iptables restore on boot ConditionPathExist=/etc/iptables-my/iprestore.sh After=network.target [Service] Type=idle User=root ExecStart=/etc/iptables-my/iprestore.sh RemainAfterExit=yes GuessMainPID=no [Install]