Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have to install a firewall on my server (so without X Server). It's a debian lenny. If it is possible, I want to avoid the use of iptables. Is there a way to install/configure a firewall for a newbie ?

share|improve this question

4 Answers 4

At first, a firewall should be the last step to secure a server. Remove all software and services which are not needed, update your system with the latest available security patches and review your config files.

Why do you want to avoid iptables?

"Because I'm a newbie" is no real excuse. A "one click everything secure" firewall doesn't exist, and if a software product uses such a slogan, its likely to be just snakeoil software.

If you are not experienced in networking basics you will have to learn this for configuring a working firewall. :-)

If you don't want to create the iptable rules yourself, you have two options:

  • customize existing scripts found on the net
  • use a GUI tool to create the rules yourself

iptables is your interface to the networking layer of the kernel. Nearly every solution for linux will depend on it.

Here are some commented example scripts/tutorials. You will easily find more with a google search.

Here is a list of GUI tools you can use to create your iptable rules:

A great book about linux servers and security is "Building Secure Servers with Linux" from O'Reilly.

Don't get discouraged and sorry for the "hard" words, but a server on the internet is not a toy and you will have some responsibility for this.

share|improve this answer
2  
Excellent answer –  fschmitt Sep 30 '10 at 12:54
    
thanks for your answer. I bought a book about the administration of LInux, and I will study iptable, but before I will look at easy chains or ufw. –  bob l'éponge est un con Oct 2 '10 at 14:45

You might consider trying ufw. While it was created for Ubuntu Server, I believe that that it is also available in Debian. (UPDATE: Unfortunately, it looks like it is only available for squeeze and sid according to packages.debian.org, but it might still be worth looking at.) While I would say that you eventually want to move to writing your own iptable rules, I initially found ufw very easy to use and very easy to transition from. Here are some highlights:

  • Convienient Syntax: ufw allow 22 or ufw allow ssh is all that is required to allow inbound ssh traffic if your default policy is DENY.

  • Easy Logging: ufw logging on will turn on fairly reasonable logging. The nice thing about the logging is that by default it drops particularly noisy services (port 137 anyone?).

  • Ability to implement complicated policies: On my home machine I use ufw and am currently running a fairly complicated policy.

  • Ability to add your own iptable rules. Pretty much any policy can still be implemented with ufw even if the default interface doesn't provide a mechanism because you can always add your own rules.

  • Great Documentation: man ufw is often all you need to solve some problem or answer some question--which is great if you are setting up your firewall when offline.

This is not a "click one button and you will be secure" firewall. At the end of the day what it really does is provide an easy to use rule-creation syntax, some abstraction around iptables-save and iptables-restore and brings some default rules and practice that a newbie might not know about.

share|improve this answer
    
Thanks for your answer, I'm going to look at it ! –  bob l'éponge est un con Oct 2 '10 at 14:47
    
+1 ufw is very easy to use and it is easy to transition to iptables after that because the abstraction level is just right (not too high like point-and-click, and not too low because of the nice defaults). –  Barthelemy Oct 27 '10 at 14:21

I recommend the firehol package.

share|improve this answer
    
it seems to be very interesting ! Thks –  bob l'éponge est un con Oct 2 '10 at 14:53

give a try at shorewall... I'm pretty happy with it and I feel it is very easy to configure whatever I need. (Including traffic shaping, NAT, DNAT and other things).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.