| Linode Forum https://forum.linode.com/ |
|
| iptables-restore not working as described in "Securing Your https://forum.linode.com/viewtopic.php?f=19&t=10830 |
Page 1 of 1 |
| Author: | rlfprog [ Thu Feb 06, 2014 6:46 pm ] |
| Post subject: | iptables-restore not working as described in "Securing Your |
I've just rebuilt a Debian 7.3 server. I'm working through the instructions in the "Securing Your Server" https://library.linode.com/securing-your-server page and copied and pasted the rules as shown into an /etc/iptables.firewall.rules file. When I run the command "sudo iptables-restore < /etc/iptables.firewall.rules", I always get this error: 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! |
|
| Author: | rlfprog [ Thu Feb 06, 2014 8:32 pm ] |
| Post subject: | Re: iptables-restore not working as described in "Securing Y |
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. |
|
| Author: | robertstam [ Tue Jun 09, 2015 9:54 am ] |
| Post subject: | Re: iptables-restore not working as described in "Securing Y |
rlfprog wrote: 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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|