Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-21-2008, 12:45 PM   #1
Registered: Oct 2004
Location: Dhaka, Bangladesh
Distribution: Redhat Linux 7.2,Redhat Linux 8.0,Redhat Linux 9.0
Posts: 36

Rep: Reputation: 15
Want to block all website traffic for few IP but they will brows only 1 site

Hi all,
I want to block all the web sites for few peoples of our company. They will only be able to brows our web mail. the rest web traffic will be blocked. all other service (ftp, messenger) will be open.

Say we have 50 IP (Range 45 of them will be blocked and the rest 5 can be able to access everything.

I am using iptables for my firewall. I tried couple of times, but failed. Could you please help me?

Thanks in advance.
Old 05-22-2008, 09:30 AM   #2
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
you need something like this:
IPTABLES -A INPUT -s -d -p tcp --dport 80 -j ACCEPT
where is your internal subnet and is the server you want to allow. Be sure to deny by default, so don't can't go anywhere else

...but I'm not a specialist, so be sure to read up on the subject:
lots of links here
some more examples


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
block internet traffic sunlinux Linux - Networking 6 06-26-2007 10:08 PM
Block Out Traffic on IPCop depam Linux - Software 2 08-23-2006 01:38 AM
how block this traffic echox Linux - Security 5 06-21-2006 10:21 PM
WebSite Traffic essoft478 General 10 12-09-2004 05:16 PM
Block Kazaa2 traffic jekyl Linux - Security 4 03-13-2003 03:53 AM

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

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