[iptables] Applying firewall rules: iptables-restore v1.4.7: no command specified Error occurred at line: 6

Tadashi Shigeoka ·  Sun, November 11, 2012

After editing iptables and restarting, an error occurred.

■ Error message

# service iptables restart
iptables: Applying firewall rules: iptables-restore v1.4.7: no command specified
Error occurred at line: 6
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
                                                           [FAILED]

■ Solution

Check if there are any spaces on empty lines. → If there are spaces, delete them

That’s all from the Gemba.


Reference Information

さくらのVPSへのiptablesの設定 | 9ensanのLifeHack