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 04-24-2004, 04:20 AM   #1
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254

Rep: Reputation: 30
blocking yahoo messenger with iptables


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
 
Old 04-24-2004, 07:00 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
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
 
Old 04-24-2004, 08:42 AM   #3
silver2003
LQ Newbie
 
Registered: Apr 2004
Location: Romania
Distribution: RedHat 7.3
Posts: 28

Rep: Reputation: 15
iptables -A INPUT -s 23.45.65.34 -p tcp --dport 5001:5050 -j DROP
 
Old 04-24-2004, 09:03 AM   #4
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99

Rep: Reputation: 15
well, i tried these script on my redhat 6.2 box replacing iptables with ipchains. but its not working
 
Old 04-24-2004, 09:13 AM   #5
badlya
LQ Newbie
 
Registered: Apr 2004
Location: india
Distribution: redhat linux
Posts: 3

Rep: Reputation: 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
 
Old 04-24-2004, 02:32 PM   #6
silver2003
LQ Newbie
 
Registered: Apr 2004
Location: Romania
Distribution: RedHat 7.3
Posts: 28

Rep: Reputation: 15
ipchains is not iptables sixth_sense. They are diffrent. see tha man pages for the ipchains and adapt the rules of the iptables.
 
  


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

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

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