linux poison RSS
linux poison Email

Block Messenger (AOL, Yahoo, MSN) services through Squid and Iptables

First of all you need to have a running copy of squid and you make transparent for your local
LAN. Add this to your squid.conf:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

And this to your IPTABLES:

iptables -t nat -A PREROUTING -i eth1 -p tcp –dport 80 -j REDIRECT –to-port 3128
iptables -A OUTPUT -j ACCEPT -m state –state NEW,ESTABLISHED,RELATED
-o eth0 -p tcp –dport 80

…where eth0 is your external interface and eth1 your internal.

To block AOL IM and ICQ:
# iptables -A FORWARD –dport 5190 -j DROP
# iptables -A FORWARD -d -j DROP

To block MSN messenger:
# iptables -A FORWARD -p TCP –dport 1863 -j DROP
# iptables -A FORWARD -d -j DROP

Kaaza Blocking
iptables -t nat -A POSTROUTING -s -d ! –dport 1214 –j DROP

Add following in squid.conf file

# Yahoo Messenger service
acl Yahoo-Mess dst *
http_access deny Yahoo-Mess

# Trillian service
acl Trillian-Mess dst
http_access deny Trillian-Mess


Post a Comment

Related Posts with Thumbnails