Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Security
Reload this Page Why a firewall under Linux
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Security Discussion about keeping your machines secure, and the crackers out.

Reply
 
Thread Tools Display Modes
Old 08-02-2007   #1 (permalink)
Linux Newbie
 
mazer's Avatar
 
Join Date: Jul 2006
Location: Tucson, Arizona, USA
Posts: 105
Why a firewall under Linux

Hi folks,

the other day, I was just wondering why Linux needs a firewall. Linux has all this great
configuration files in order to limit the access to a machine from the outside. Under FC*,
for example, I can deinstall easily all unnecessary daemons (usually a private person does not need sendmal, bind, httpd, named ......) with yum which helps me to secure my system.
hosts.allow and host.deny give me also great possibilities to prevent me from any cracker.
Therefore my question: Why do I need a firewall?

Mazer
mazer is offline   Reply With Quote
Old 08-02-2007   #2 (permalink)
Bigtomrodinator
 
bigtomrodney's Avatar
 
Join Date: Nov 2004
Location: Sunny South-East of Ireland
Posts: 5,186
You don't 'need' one but it's a good idea. Think of iptables though. It's not just for closing ports. You can run ssh and block access to some but not all. Granted you can do this in hosts.deny but you can also go further and limit the number of times someone can access. Not everyone has the expertise or inclination to make all of the stops around the system that a firewall can do in one go.
__________________
Registered Linux user #378740
New members read here / Forum Rules
#linuxforums on irc.freenode.net
bigtomrodney is offline   Reply With Quote
Old 08-02-2007   #3 (permalink)
Linux Newbie
 
mazer's Avatar
 
Join Date: Jul 2006
Location: Tucson, Arizona, USA
Posts: 105
Quote:
Originally Posted by bigtomrodney View Post
You don't 'need' one but it's a good idea. Think of iptables though. It's not just for closing ports. You can run ssh and block access to some but not all. Granted you can do this in hosts.deny but you can also go further and limit the number of times someone can access. Not everyone has the expertise or inclination to make all of the stops around the system that a firewall can do in one go.
You are right. You have a greater flexibility and I guess (actually I have not setup a firewall yet ) the configuration files are not spread over the entire /etc directory. But somehow, I have also the impression that a firewall encourages not to think about a clear and clean linux setup (I mean on the distribution side). In the old days, I have used Suse
a lot (5.1 was my first distribution). At this time (I do not know how it is nowadays), they had a lot of daemons running, which were not really necessary (like inted or xinted. I do not even know why I needed that.). Why does a normal user needs to have sendmail installed or nfs? For a network, I can understand that. You have one computer with a perfectly setup firewall and in the back you have the entire network with several computers, which do not need to be configured.

Mazer
mazer is offline   Reply With Quote
Old 08-02-2007   #4 (permalink)
Bigtomrodinator
 
bigtomrodney's Avatar
 
Join Date: Nov 2004
Location: Sunny South-East of Ireland
Posts: 5,186
I agree with what you are saying. Distros like Ubuntu come with no services listening. You even need to install sshd seperately. I guess it's just convenience in some distros to leave this stuff running. Then again if you start with some other distros you just about get a running kernel

I guess it depends on the target audience.
__________________
Registered Linux user #378740
New members read here / Forum Rules
#linuxforums on irc.freenode.net
bigtomrodney is offline   Reply With Quote
Old 08-03-2007   #5 (permalink)
Just Joined!
 
Join Date: Apr 2007
Posts: 47
Quote:
Originally Posted by mazer View Post
I was just wondering why Linux needs a firewall.
1. Sometimes your machine acts as a server (bittorrent, p2p networks etc) If you dont want that on a permanent basis, a firewall permits you to allow/drop these incoming connexions easily.

2. If you use closed source software, restricting the outgoing connections to the protocols you really need prevents some apps from "calling home"

3. A firewall protects your machine from ports probing, which, if repeated, can reveal to hackers a vulnerability some day. Your firewall makes your machine stealth, so non-existent for the hacher.

4. If you are security conscious, a highly configurable firewall (for example Shorewall) permits you to fine-tune your configuration so that you have more control on incoming packets (suspicious flags, martian or invalid packets, route filtering etc)
g.ivannov is offline   Reply With Quote
Old 08-03-2007   #6 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,699
'Security in layers' approach. I've set up workstations (which had no services listening on an external interface) without a firewall in the past.

Make sure you're aware of what is really listening on your box -- netstat and nmap can help.
anomie is offline   Reply With Quote
Old 08-03-2007   #7 (permalink)
Linux Newbie
 
mazer's Avatar
 
Join Date: Jul 2006
Location: Tucson, Arizona, USA
Posts: 105
Quote:
Originally Posted by anomie View Post
'Security in layers' approach. I've set up workstations (which had no services listening on an external interface) without a firewall in the past.

Make sure you're aware of what is really listening on your box -- netstat and nmap can help.
I have just realized that there is already a great permanent thread about this topic from fingal: "A short guide to security". I have still no firewall running but stopped and deinstalled all unnecessary daemons. Nmap just tells me that ssh is open as I have intended. rkhunter and chkrootkit have told me that everything is fine. One can only log into my machine with ssh if he has a key. My box should be pretty secure now, shouldn't it? What would a firewall do additionally? Scan port 22 in order to determine an attack?

Mazer
mazer is offline   Reply With Quote
Old 08-03-2007   #8 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,699
Quote:
Originally Posted by mazer
What would a firewall do additionally? Scan port 22 in order to determine an attack?
It could block subnets you specify from seeing that tcp port 22 is open at all.
anomie is offline   Reply With Quote
Old 08-03-2007   #9 (permalink)
Linux Newbie
 
mazer's Avatar
 
Join Date: Jul 2006
Location: Tucson, Arizona, USA
Posts: 105
Quote:
Originally Posted by anomie View Post
It could block subnets you specify from seeing that tcp port 22 is open at all.
Couldn't I do that also with hosts.deny?
mazer is offline   Reply With Quote
Old 08-03-2007   #10 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,699
Well, tcp_wrappers does offer a similar functionality for the result you want, but it denies subnets on a different level (libwrap.so support gets compiled into the daemon you're running -- in this case sshd). A port scan will still show that tcp port 22 is open. The packet filtering provided by iptables/netfilter can prevent scanners from seeing port 22 as anything but filtered.

Does it matter? Probably not. If you were a high-profile target you might be interested in throttling connections and traffic shaping with iptables. (Then again, if you were a high-profile target you probably wouldn't be relying on a host-level firewall.)

I'm not arguing that you should make any changes. I have a server with a similar setup to what you describe: sshd running with pubkey authentication only (and some other tweaks to harden the config) and no packet filtering on that port.
anomie is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random reboot...? Azureus the culprit? Quaenorde SuSE Linux Help 21 06-16-2007 09:41 PM
speedtouch modem connect problem and tainted kernel superkarimo SuSE Linux Help 0 01-04-2007 05:37 PM
need help with dial-up connection SuSE 10 kmargaris SuSE Linux Help 13 12-29-2005 06:40 PM
Need Help for Linux Firewall mikewagner Linux Networking 1 01-03-2005 11:56 AM
The Ultimate Linux FAQ jasonlambert Linux Tutorials, HOWTO's & Reference Material 0 10-20-2003 09:32 PM

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 02:32 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0