Default Firewall settings

I have a LAMP setup with Ubuntu 9.10 and want to know if there is one command or the easiest way to simply block all ports on a firewall and open up only the ports that are required for web server functionality. (email, http, etc)

What ports and configurations does everyone have and/or recommend? I'm wanting to limit as many open holes as possible. Thanks.

2 Replies

The ports you need open depends on what you're doing, a LAMP stack you need 80.

Here's a guide to configuring a firewall for debian, which is pretty much the same as ubuntu

http://library.linode.com/networking/se … bian-lenny">http://library.linode.com/networking/security-guides/arno-iptables-firewall-debian-lenny

Or, take a look at ufw, which is documented in the Ubuntu Server Guide:

https://help.ubuntu.com/9.10/serverguid … ewall.html">https://help.ubuntu.com/9.10/serverguide/C/firewall.html

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