LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-28-2002, 04:33 PM   #1
SkYzOpReNiCk
Member
 
Registered: Feb 2001
Location: Costa Rica
Distribution: SuSE
Posts: 47

Rep: Reputation: 15
Unhappy iptables only block Messenger to some users


HI I know how to block messenger all users on the network using iptables, but how I could only block some users to use them?

this is the way that I could block all

iptables -A FORWARD -p TCP --dport 1863 -j REJECT
iptables -A FORWARD -d 64.4.13.0/24 -j REJECT


I was trying to block them all, and only give access to some of them. Like this:

iptables -A FORWARD -p TCP --dport 1863 -j REJECT
iptables -A FORWARD -d 64.4.13.0/24 -j REJECT
iptables -A FORWARD -p tcp -s 10.10.10.31 --dport 1863 -j ACCEPT
iptables -A FORWARD -p tcp -s 10.10.10.12 --dport 1863 -j ACCEPT


Does someone could help me with an example?
 
Old 12-20-2007, 12:08 AM   #2
fulvous
LQ Newbie
 
Registered: Dec 2007
Distribution: fedora
Posts: 5

Rep: Reputation: 0
Order matters

Hi there!

Remember that when talking about iptables, the order of the rules really matters. The system will inspect the traffic against the first rule, if it's rejected no more rules will be inspected.

Just try to switch the lines and give it a shot, if that doesn't work try to add also a line for the 64.4.13 network as a permitted destination.

iptables -A FORWARD -p tcp -s 10.10.10.31 --dport 1863 -j ACCEPT
iptables -A FORWARD -p tcp -s 10.10.10.12 --dport 1863 -j ACCEPT
iptables -A FORWARD -p TCP --dport 1863 -j REJECT
iptables -A FORWARD -d 64.4.13.0/24 -j REJECT

Hope it helps!
 
  


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
Block yahoo messenger space_beyond Linux - Security 5 05-23-2005 08:53 PM
DESPERATE : Iptables block users by MAC address. ranjan303 Linux - Security 28 03-29-2005 01:15 AM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
Block Yahoo messenger Rajesh_Amma Linux - Networking 1 02-21-2005 03:02 AM
how Block MSN Messenger.... jamiguel77 Linux - Networking 3 09-17-2004 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:11 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