How can I configure firewall for what I use as a web development server. I should be blocking all ports except 80 (HTTP), FTP, SSH? I tried configuring using ufw
, gufw
, firestarter
but I ended up blocking myself from surfing the net ... :)
Asked
Active
Viewed 4,614 times
1

JM at Work
- 1,965
1 Answers
2
Here is my ufw configuration
sudo ufw enable #Enable ufw
sudo ufw default deny #By default deny everything
sudo ufw allow 22 #Allow port 22 (ssh) I also use this for sftp
sudo ufw allow 80 #Allow port 80 (http)
sudo ufw allow 9418 #Allow port 9418 (git) You probably wont need this
sudo ufw limit ssh/tcp #Limit connections to ssh/tcp to slowdown possible attacks

LayerCake
- 1,046
-
-
So now I have the following for
ufw status
and outside still cannot access the server ... I cannot surf the net too ... also the following foriptables -L
– JM at Work May 13 '11 at 04:56 -
No deny shouldn't be at the bottom maybe some of your settings stuck try sudo ufw reset after that retry the commands in the order i posted them – LayerCake May 13 '11 at 05:01
ufw
into your question. we will help you unblocking your self – Achu May 12 '11 at 10:56sudo ufw default deny
any ideas?ufw status
http://pastie.org/1895350 – JM at Work May 13 '11 at 02:0680
in and out. make sure to remove all firewalls you have installed and configured. and you should use only one firewallufw
orfirestarter
may it is complex to manage all firewalls. – Achu May 13 '11 at 07:26