Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Feb 06, 2014 6:46 pm 
Offline
Junior Member

Joined: Thu Feb 06, 2014 6:26 pm
Posts: 25
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!


Top
   
PostPosted: Thu Feb 06, 2014 8:32 pm 
Offline
Junior Member

Joined: Thu Feb 06, 2014 6:26 pm
Posts: 25
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.


Top
   
PostPosted: Tue Jun 09, 2015 9:54 am 
Offline
Senior Newbie

Joined: Mon Sep 29, 2014 1:21 am
Posts: 17
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group