LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 04-24-2004, 05:20 AM   #1
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254
Thanked: 0
blocking yahoo messenger with iptables


[Log in to get rid of this advertisement]
I want to block yahoo messenger probably these ports (5001-5002,5050) to some of my clients, I have network of more then 100+ machines and they connecting with dialup

However I want to block yahoo messenger only for specific IP for example IP: 23.45.65.34 not to all IPs

I am running firewall machine, linux on it and i am using iptables.
anyone tell me what will be the rules for doing this.

iptables -A INPUT ........blah blah


thanks
mardanian is offline     Reply With Quote
Old 04-24-2004, 08:00 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,173
Thanked: 0
as i know messenger can use http port. u may need packet filter like snort. i dont know snort enough. www.snort.org

u may try the following:

iptables -A FORWARD -s 23.45.65.34 -p tcp --dport 5001:5050 -j REJECT

it wont allow forwarding if pakets comes from 23.45.65.34 and protokol is tcp and port between 5001 and 5050

u may prefer -j DROP instead of -j REJECT
maxut is offline     Reply With Quote
Old 04-24-2004, 09:42 AM   #3
silver2003
LQ Newbie
 
Registered: Apr 2004
Location: Romania
Distribution: RedHat 7.3
Posts: 28
Thanked: 0
iptables -A INPUT -s 23.45.65.34 -p tcp --dport 5001:5050 -j DROP
silver2003 is offline     Reply With Quote
Old 04-24-2004, 10:03 AM   #4
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99
Thanked: 0
well, i tried these script on my redhat 6.2 box replacing iptables with ipchains. but its not working
sixth_sense is offline     Reply With Quote
Old 04-24-2004, 10:13 AM   #5
badlya
LQ Newbie
 
Registered: Apr 2004
Location: india
Distribution: redhat linux
Posts: 3
Thanked: 0
Actually yahoo messenger is having facility ( for us it's a problem) that yahoo can use any port (see yahoo messenger help for details) so here is my script for blocking yahoo messenger. but it will work if the yahoo policy is not changed. if this script still unable to block messenger then again reply me .

iptables -A FORWARD -p TCP --dport 5000:5100 -j REJECT
iptables -A FORWARD -p TCP -d scsa.yahoo.com -j REJECT
iptables -A FORWARD -p TCP -d cs.yahoo.com -j REJECT
iptables -A FORWARD -p TCP -d scsa.msg.yahoo.com -j REJECT
iptables -A FORWARD -p TCP -d messenger.yahoo.com -j REJECT
badlya is offline     Reply With Quote
Old 04-24-2004, 03:32 PM   #6
silver2003
LQ Newbie
 
Registered: Apr 2004
Location: Romania
Distribution: RedHat 7.3
Posts: 28
Thanked: 0
ipchains is not iptables sixth_sense. They are diffrent. see tha man pages for the ipchains and adapt the rules of the iptables.
silver2003 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
using squid -blocking yahoo messenger gadekishore Linux - Software 1 10-19-2005 07:53 AM
blocking yahoo messenger with iptables linuxboy_inside Linux - Security 3 01-20-2004 10:12 PM
Instant messenger Chat Kopete mandrake linux yahoo and MSN messenger saurya_s Linux - Software 1 11-22-2003 02:05 PM
monitoring and/or blocking yahoo messenger at firewall chrisfirestar Linux - General 1 10-27-2003 10:06 AM
Blocking yahoo games using iptables dunkyb Linux - Networking 16 02-27-2003 07:42 AM


All times are GMT -5. The time now is 05:42 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration