September 21, 2021, 06:12:56 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: blocking yahoo messenger on transparent proxy  (Read 17055 times)

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
blocking yahoo messenger on transparent proxy
« on: July 04, 2005, 05:24:36 PM »
i am using transparent proxy with port 3128. I want to block yahoo messenger for the users. If it all i need to block port on messenger what is the port no.

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
blocking yahoo messenger on transparent proxy
« Reply #1 on: July 05, 2005, 07:03:26 AM »
Well I doubt if you can block yahoo messenger in transparent mode !

That is because we only redirect clients request on port 80 to squid so request on other posts will not be blocked. We can instead use iptables to block yahoo messenger. Let see if I can find ports.

Ok I found that these stuff for you .. It took me time :)
Anyways..

Quote
Yahoo! Messenger services uses a variety of ports.
Service................................Ports
Chat & Messenger-----------> TCP Port 5050: Client Access only
Insider/Room Lists --------->TCP Port 80: Client Access only
File Transfer----------------->   TCP Port 80: Server Access.
Your ISP may block this port, as its used for web hosting.
You can change port in Messenger, Preferences, File Transfer.
Voice Chat ------------------->   UDP 5000-5010
TCP 5000-5001:--------------> Client Access
If UDP Fails, TCP will be used instead, see below.
WebCam    -------------------->TCP Port 5100: Client Access
Super Webcam--------------->TCP Port 5100: Server Access
P2P Instant Messages------->TCP Port 5101: Server Access
PMs between Buddys may not use the Yahoo! Server, but this is not a requirement.


So in this i suggest use iptables to block the ports..
simple rules to DROP are ::
Code: [Select]
# This line is to drop TCP port 5101
iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 5101 -j DROP      

  # This line is to drop UDP port 5000
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5000 -j DROP


Hope this will help .

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
blocking yahoo messenger on transparent proxy
« Reply #2 on: July 05, 2005, 09:03:33 AM »
Again tks a ton ricky, u r just great and tks for ur effort.
 If write the above command in rc.nat it vil block yahoo messenger for all of them. But my requirements is to block for certain users. Can u help me

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
ACL indepth
« Reply #3 on: July 05, 2005, 04:08:00 PM »
Ricky i have tried your solution, it snot working.
I have written iptables in rc.nat, still users are able to use yahoo messenger

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
blocking yahoo messenger on transparent proxy
« Reply #4 on: July 06, 2005, 01:41:20 PM »
Yahoo messenger has also ability to use port 80 if no other port is working.

but here I think you have only used the rules I have given . :roll: . If that so then you have to make more rules because those are only example. Make such rules for every port I have given..

Ok let me give you ... you just write following in your rc.nat !
Code: [Select]

iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 5101 -j DROP  
iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 5050 -j DROP        
iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 5000 -j DROP  
iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 5001 -j DROP    
iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 5100 -j DROP
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5002 -j DROP        
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5003 -j DROP    
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5004 -j DROP  
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5005 -j DROP  
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5006 -j DROP  
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5007 -j DROP  
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5008 -j DROP
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5009 -j DROP      
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5000 -j DROP
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 5010 -j DROP  


Use the above and tell us hw it is !

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
blocking yahoo messenger on transparent proxy
« Reply #5 on: July 06, 2005, 04:36:35 PM »
Ricky tks for ur effort once again, but no luck. Still the users are able use yahoo messenger.

Instead of blocking through ports, it is possible to block on content, apllication etc., is there any way

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
blocking yahoo messenger on transparent proxy
« Reply #6 on: July 07, 2005, 04:06:05 PM »
Ricky, I was successful in blocking yahoo messenger in squid.conf using

acl ysg dstdomain messenegr.yahoo.com  
acl ysg dstdomain shttp.msg.yahoo.com  
acl ysg dstdomain psq.yahoo.com  
acl ysg dstdomain us.il.yimg.com

but what is the way to block in transparent proxy that 2 for a particular IP

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
blocking yahoo messenger on transparent proxy
« Reply #7 on: July 09, 2005, 04:34:11 PM »
you are asking single question at many places.. I am confused if I have answered it at some other place or not..

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
blocking yahoo messenger on transparent proxy
« Reply #8 on: July 11, 2005, 10:35:39 AM »
sorry ricky even i am little bit confused for not able to solve this problem.

u did answer but nothing going my way, its not working.