You are here

Error message: iptables-restore v1.x.x: no command specified

Submitted by Druss on Thu, 2011-11-24 12:29

If you run into the following error message when attempting an iptables-restore < my.rules:
iptables-restore v1.4.8: no command specified
then the problem is that you have very likely just copied and pasted stuff into my.rules which has led to some dodgy line-breaks terminating blank lines in the file.

To fix, open the file in an editor, delete the blank lines and manually insert new ones in their place. It should be sufficient to do this only for blank lines that have been introduced during the copy & paste. Once this is done, save the file and attempt the iptables-restore once again.

Comments