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,
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