... because from time to time I'm a web developer, too
About me
Projects
Contact
Links

Build firewall on server (ubuntu)

January 25, 2010 | linux, tools
author: Karol Zielinski | comments: 1 | views: 641
Tags: , , , ,

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.

ubuntu

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

Bookmark and Share
Post Build firewall on server (ubuntu) to develway Post Build firewall on server (ubuntu) to Delicious Post Build firewall on server (ubuntu) to Digg Post Build firewall on server (ubuntu) to Facebook Post Build firewall on server (ubuntu) to Reddit Post Build firewall on server (ubuntu) to StumbleUpon

Related news and resources

Comments (1)

4Avatars v0.3.1
Firewall na serwerze (ubuntu) - develway.pl - wiadomości dla programistów, wiadomości IT, świeże linki ze świata IT
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 [...]

Write a comment

Karol Zielinski :: Just a tech stuff 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.

Most popular posts

Much more links

Karol Zielinski    |   contact me
Gdynia, Poland
RSS - Just a tech stuff - python, java blog - web development blog Karol Zielinski on twitter Karol Zielinski on LinkedIn Karol Zielinski on facebook Karol Zielinski on delicious Karol Zielinski on digg Karol Zielinski on flickr Karol Zielinski on stumbleupon Karol Zielinski on technorati