Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to set up a VPS which I bought at RamNode.

I am following these instructions: http://endofweb.co.uk/2010/10/ubuntu-vps-nginx-mysql-php-fpm-phpmyadmin-wordpress/

I am now at the part which says:

Now that you know what an empty /etc/iptables.rules file looks like, we’ll go ahead and secure it by adding rules:

user1@ve:~$ sudo nano /etc/iptables.rules

Add the rules seen in the example below so that your /etc/iptables.rules looks just like it. These rules state that outgoing connections are just fine, but all incoming traffic to any port other than 80, 443, 22 or 21 is blocked — unless it’s already been established legitimately.

And I copy + pasted the iptables.rules files exactly as it was described using the nano text editor.

However, when I try to apply the new rules by doing:

sudo iptables-restore < /etc/iptables.rules

It gives the following error:

Bad argument `'lo'

Error occurred at line: 6

Try `iptables-restore -h' or 'iptables-restore --help' for more information.

What am I doing wrong? Is there something wrong with the iptables.rules file?

Thanks in advance,

Frank

Update:

By using the command

ifconfig lo 127.0.0.1

the error message disappeared. But now I have:

iptables-restore v1.4.12: iptables-restore: unable to initialize table 'filter'

Error occurred at line: 2

share|improve this question
1  
Looks like the kernel doesn't have Iptables support. There are some VPS that have that limitation if they are based in containers AFAIK. – diegows Aug 4 '12 at 22:23

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.