LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 05-21-2008, 01:45 PM   #1
aronnok
Member
 
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 192.168.0.1-254). 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, 10:30 AM   #2
stzein
Member
 
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
you need something like this:
Code:
IPTABLES -A INPUT -s 1.2.3.4/24 -d 5.6.7.8 -p tcp --dport 80 -j ACCEPT
where 1.2.3.4/24 is your internal subnet and 5.6.7.8 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
 
  


Reply


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


All times are GMT -5. The time now is 08:47 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration