LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-28-2005, 04:42 AM   #1
shamza
LQ Newbie
 
Registered: Jul 2005
Location: PAKISTAN
Posts: 3

Rep: Reputation: 0
IM blocking with combination of IPtables & Squid


Hi,

I am using Linux AS 2.1 with squid-2.4 stable6-1.7.2 and iptables with MASQURADE (snat) . i want to block any internet messenger in my LAN i had already created following ACL and blocked them

messenger.hotmail.com
login.oscar.aol.com
login.icq.com
http.proxy.icq.com
msg.edit.yahoo.com
messenger.yahoo.com
http.pager.yahoo.com

but no success. any one can guide me ???

my iptables script are blow

iptables=/sbin/iptables
$iptables --flush -t nat
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
 
Old 09-29-2005, 01:00 AM   #2
usmanmehmood
LQ Newbie
 
Registered: Sep 2005
Posts: 15

Rep: Reputation: 0
Iptables:
FOR YAHOO:
iptables -I OUTPUT -o eth1 -s IpOfClient -p tcp -m multiport --dport 5000,5001,5100,5050,11999 -j DROP
FOR MSN:
iptables -I OUTPUT -o eth1 -s IpOfClient -p tcp --dport 1836

You can block arbitrary strings in packets using the string match
support in the P-O-M for netfilter, e.g. -m string --string 'KAZAA'

but its better to use squid for that purpose
i suggest u to block MIME types.

acl msn_messenger req_mime_type -i "illegal-mime-types.txt"
http_access deny msn_messenger

and in illegal-mime-types.txt, enter MIME types.

^application/x-msn-messenger$



i dont know yahoo and aol mime types but u can search them on internet.
 
  


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
SQUID for blocking yahoo and msn [inc squid.conf] chrisfirestar Linux - Security 10 03-03-2008 08:33 AM
squid reverse-proxy dual port combination glenne Linux - Networking 1 02-04-2008 08:23 AM
long lastin troubles with iptables & squid karpo66 Linux - Networking 0 01-23-2005 09:34 AM
Blocking squid through iptables jomy Linux - Networking 1 12-20-2004 09:24 AM
Iptables & squid issues sedulous Linux - Networking 1 10-05-2003 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:56 AM.

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