LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-21-2011, 12:11 AM   #1
Thirupathi.nagapuri
LQ Newbie
 
Registered: Mar 2011
Posts: 14

Rep: Reputation: 0
Open source firewall


Hi All,

I want configure open source firewall on my office for websites blocking and bandwidth monitoring.

Can any please tell me which is the beast free open source firewall........

Regards
Thirupathi
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-21-2011, 01:55 AM   #2
lab-rat
Member
 
Registered: Dec 2008
Distribution: Fedora Core 9, suse11.3 ,Ubuntu-super 10.10, Lubuntu 12.04 - 14.04.3
Posts: 35

Rep: Reputation: 4
Thirupathi

Most Distros have their own FW's available and active on them. For instance, Fedora uses the SELinux FW, Suse uses the AppArmour FW. Check with your distros package management site.
You just need to learn how to use them.

If you are thinking of using something like Smoothewall, read the HOW-TOs on the Smoothewall home page.Also go read the several sites on the Internet on IPtables and how they work.

Alternatively, what I do is this; I have my PC's attached to a routered network and use the default firewalls inherent to the OS. The Router acts like a hardware Firewall, and then all SElinux needs to do is monitor LAN cross traffic.
This method is the simplest.

If you are still Gung-Ho at using a 3rd party FW for your LAN ... then Smooth Wall goes on a PC separate from the one you logged onto this Forum with.

graphically its like this::

internet --> modem --> Gateway [Firewall} PC --> LAN Switch or Hub [ switch is better]--> LAN PC's

or Using a router , like this ::

Internet--> modem --> Router --> LAN PC's


So a router is much simpler
And routers are not that expensive
But if you are persistent on learning IPchains method , read the HowTo's on the net ... and read the Smoothewall site info and go from there .


ok?


L-R
 
0 members found this post helpful.
Old 04-21-2011, 04:56 AM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
The default "firewall" built into Linux is called Iptables. It is a front end for netfilter which is built into the Linux kernel itself. Iptables is a program that can be a little difficult to setup, as the syntax is a little bit strange until you get used to it, but not so much that you should shy away from it. Once you do get used to it, writing scripts for iptables becomes somewhat of an art. There are also GUI applications to assist with the setup, like UFCW and Firestarter, though this will depend on your distribution.

As far as for blocking websites, I assume you mean that you want to prevent others from being able to access certain sites. In this case, you would want to use a proxy, such as Squid. Squid may also provide bandwidth monitoring.

One application that I like to use to monitor network activity is Iftop. On the surface, it looks like a simple program, much like Top, but has a lot of capability.

I don't really consider AppArmor and SELinux to be "firewalls". In my opinion, those are more of a system hardening application where it enforces access rights as an extension to the standard Linux permissions system.
 
2 members found this post helpful.
Old 04-21-2011, 05:35 AM   #4
poorsod
LQ Newbie
 
Registered: Apr 2011
Posts: 16

Rep: Reputation: 3
Quote:
Originally Posted by Thirupathi.nagapuri View Post
Hi All,

I want configure open source firewall on my office for websites blocking and bandwidth monitoring.

Can any please tell me which is the beast free open source firewall........

Regards
Thirupathi
Yes as said above. IPTables is your standard linux network firewall these days. Your distro probably comes with a graphical utility to make firewall rules.

So to block access to a certain website a rule such as:
Code:
# iptables -A OUTPUT -p tcp -d remote_IP_address --dport www -j REJECT
could be used. Though this may block access to any other website on that are on the IP. To get around that you could block the DNS resolution in /etc/hosts on your DNS server, or just every PC. By putting a line in like:
127.0.0.1 www.evilsite.youwantotblock.com

this is easily bypassed with a proxy though.

As for bandwidth monitoring I've never had to do that personally, but there looks to be a good tutorial for a simple (text based) solution it here: http://www.linux.com/learn/tutorials...-with-iptables

Though consider quid and iftop as mentioned above.

Last edited by poorsod; 04-21-2011 at 05:37 AM.
 
Old 04-22-2011, 05:01 PM   #5
tanvir1
LQ Newbie
 
Registered: Apr 2009
Location: Canberra, Australia
Posts: 7

Rep: Reputation: Disabled
The best free, open-source and human-readable firewall is probably OpenBSD's PF http://www.openbsd.org/faq/pf/
 
Old 04-22-2011, 05:05 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might consider using a proxy, as suggested, but use a white list instead of a black list. Allow traffic only to locations that employees need to use for their job.
 
Old 04-29-2011, 02:23 PM   #7
Thirupathi.nagapuri
LQ Newbie
 
Registered: Mar 2011
Posts: 14

Original Poster
Rep: Reputation: 0
Hi All,

Thanks for suggestions finally i have configured the SQUID with SARG and it is working fine.

Thanks for all help.


Regards
Thirupathi
 
Old 04-29-2011, 02:29 PM   #8
unixfool
Member
 
Registered: May 2005
Location: Northern VA
Distribution: Slackware, Ubuntu, FreeBSD, OpenBSD, OS X
Posts: 782
Blog Entries: 8

Rep: Reputation: 158Reputation: 158
Sweet!

Can you mark the post as SOLVED? Thanks!
 
Old 04-29-2011, 02:33 PM   #9
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by lab-rat View Post
Most Distros have their own FW's available and active on them. For instance, Fedora uses the SELinux FW, Suse uses the AppArmour FW. Check with your distros package management site.
You just need to learn how to use them.
  1. Selinux is not a firewall. It is an extended Access Control program for Linux.
  2. Apparmor is not a firewall. It is an application security module for Linux.
  3. Fedora uses "iptables."
 
1 members found this post helpful.
Old 05-27-2011, 02:55 AM   #10
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
Quote:
Originally Posted by Noway2 View Post
One application that I like to use to monitor network activity is Iftop. On the surface, it looks like a simple program, much like Top, but has a lot of capability.
I would like to say a few words about 2 other tools:
- netwatch
- iptraf
I use both and I like them. Hope my modest advice could be helpful to somebody. :-)
Attached Thumbnails
Click image for larger version

Name:	iptraf.png
Views:	15
Size:	24.2 KB
ID:	7135  

Last edited by Lexus45; 05-27-2011 at 02:57 AM.
 
3 members found this post helpful.
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Open source tool to monitor network latency due to software/hardware firewall kris_rocks! Linux - Security 1 02-11-2011 03:40 PM
LXer: Setting Up an Open Source Server, Firewall and Router on Endian, Part 1 LXer Syndicated Linux News 0 10-23-2010 04:00 AM
LXer: Breach Security's ModSecurity Open Source Web Application Firewall LXer Syndicated Linux News 0 12-06-2007 08:20 PM
LXer: Open Source Geospatial Foundation Selects Tyler Mitchell, Open Source Advocate, as Executive Director LXer Syndicated Linux News 0 10-19-2006 09:54 PM
LXer: Open source router tempts company to bid Cisco firewall farewell LXer Syndicated Linux News 0 10-03-2006 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration