iptables-restore not working as described in "Securing Your
https://library.linode.com/securing-your-server
iptables-restore v1.4.14: no command specified
Error occurred at line: 33
Line 33 is the last line in the file, "COMMIT".
I copied and pasted the file from the web page into sublimetext editor and double-checked to ensure there aren't any bad characters in the file. The permissions for the file are 644 and it's owned by root:root.
Has something changed to make this document out-of-date? I went through this process early last December and I was able to create this file and then create the firewall rules without any problems.
Thanks!
2 Replies
@rlfprog:
I discovered the solution. For a reason I don't understand, there needs to be a blank line after the final line that contains the "COMMIT" statement. Copying and pasting the file's contents from the web page won't necessarily add a blank line.
True indeed. Thanks for that! The extra line did the trick.