Build firewall on server (ubuntu)
January 25, 2010 | linux, toolsauthor: Karol Zielinski | comments: 2 | views: 1299
Tags: firewall, port, server, ubuntu, ufw
I would like to secure my VPS. That’s why I had to find some more informations about firewalls. The most interesting idea… “firewall” via iptales. However managing iptables is a litlle bit complicated, so I decided to use UFW.
What you have to know: UFW is not the firewall. UFW just configures your iptables
And that’s what I was looking for.
First… check what you have installed on your server and which ports are opened. Do it by ‘ps -aux’ and ‘nmap’. Consider which ports you would like to have opened and which ones should be closed.
Next… install UFW:
sudo apt-get install ufw
and disable all ports:
sudo ufw default deny
Next… configure your firewall.
I would like to have one port opened (80) and one port opened just for my IP (22). So I need to do:
sudo ufw allow to any port 80 sudo ufw allow from MY_IP_ADDRESS to any port 22
and that’s all.
Now turn on the firewall:
sudo ufw enable
and check everything:
sudo ufw status
More commands and informations related to UFW:
http://ubuntuforums.org/showthread.php?t=823741
Hello, I'm Karol Zielinski, internet evangelist, an entrepreneur, project manager and a web developer from Gdynia, Poland. I like creative design, good advertisement, social media and all kind of stuff around the web.
January 25, 2010, 4:41 am
[...] tech.karolzielinski.com Follow us on Twitter 23 śledzących RSS Feed 186 czytelników Firewall na serwerze (ubuntu) 1 głosuj! Budujemy bardzo prosty firewall na serwerze (ubuntu), czyli blokujemy wszystko [...]
May 21, 2010, 2:47 am
[...] First… build firewall on your server. [...]