Help Setup Shorewall On Ubuntu 9.04
I can't find a guide that just leads you through every step. It always tells me to customize it for my setup or something like that and I have no clue what to do.
Any help is greatly appreciated!
6 Replies
Shorewall setup is going to be the same for 99% of setups, the only difference is which ports your allow external access to… In your case you probably want to allow the following ports:
80 (HTTP)
22 (SSH)
3306 (only if you plan on doing MySQL testing from a home machine or something)
Refer to this page for 90% of your information:
Ignore the warning about installing shorewall on a remote machine. That's what LISH is for.
Thanks for the help
EDIT: Nevermind about the port thing. I think I got it all working now.
How do I test the firewall to make sure it's doing what it should be doing?
'shorewall status' says it's running and as far as I can tell the site + ssh still connect so that much works.
vi /etc/shorewall/rules
# Permit all ICMP traffic FROM the firewall TO the net zone
ACCEPT $FW net icmp
# mail lines
SMTP/ACCEPT net $FW
SMTPS/ACCEPT net
Submission/ACCEPT net $FW
IMAP/ACCEPT net $FW
IMAPS/ACCEPT net $FW
#web
Web/ACCEPT net $FW
The line containing SMTP/ACCEPT net $FW will allow traffic on port 25 from the zone 'net', according to the macro defined in /usr/share/shorewall/macro.SMTP. To specify port 2525 manually, use a line such as````
Accept from anyone on the net
ACCEPT net $FW tcp 2525
Or accept from IP 1.2.3.4
ACCEPT net:1.2.3.4 $FW tcp 2525
````
That confirms it to me that I did it the right way.
Now I just need a test script that can make sure I did everything right and I'll be finished.
You can also install something like a ventrilo server to test it out if you want. Install it, start the server, try to connect (it should fail), add 3784 to Shorewall, restart Shorewall and you should be able to connect.