Configure iptables

I'm running Ubuntu 8.04 LTS x86 on a Linode 360.

I'm wanting to configure iptables, but I can't seem to do so. If I can't configure iptables such as those at the competitor but when I follow the instructions, they don't work.

Any ideas on the best ways to secure my server?

7 Replies

Explain what you mean by "you can't configure iptables"

I'm not sure why you can't do it, especially because those instructions are valid for all Ubuntu server setups.

If you can, however, use "ufw" (Uncomplicated Firewall) developed by Ubuntu which handles the iptables stuff for you. Install it with "apt-get install ufw".

If you want to ban an IP for example:

ufw deny from 111.111.111.111

or to allow one:

ufw allow from 111.111.111.111

@sphinx:

If I can't configure iptables such as those at the competitor but when I follow the instructions, they don't work.

FWIW I use the competitor instructions and it works fine on my Linode 'slice' ;-)

Can you explain what problem you're getting?

Basically, when I entered the command 'iptables -L' it said the command iptables doesn't exist.

So I tried running apt-get install iptables, and then all the iptables commands started working.

I would have thought that iptables would have worked by default.

Not to derail anything but I have some burning questions..

Why install Ubuntu and not Debian? What's in Ubuntu that's not in Debian that you could use on your node?

@A32:

Not to derail anything but I have some burning questions..

Why install Ubuntu and not Debian? What's in Ubuntu that's not in Debian that you could use on your node?

1) Ubuntu is configured to be n00b-friendly by default. Of course you can also configure Debian to behave like Ubuntu, but I mean "default" as in "out of the box".

2) Because of 1), there are a lot more resources (tutorials, etc.) on the 'net that a n00b can use to set up a Ubuntu server. By contrast, reliable tutorials involving Debian tend to focus on more advanced topics.

3) Ubuntu comes with official tech support from Canonical.

4) Debian Etch is outdated. (Etch has more RC bugs than Lenny.) And if you're a n00b you don't want to try upgrading.

BTW, I use both Debian Lenny and Ubuntu Intrepid. Not much difference really, when it comes to the server.

@sphinx:

I would have thought that iptables would have worked by default.

The distro templates contain whats needed to run sshd and the package manager.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct