Home     RSSRSS

how to block yahoo messenger with squid and iptables

October 9, 2008 by voidzzz | Filed under How-To, Linux.

there are a lot of home users using instant messenger (yahoo messenger is one of it) but almost all company forbid their employee to use it with several reason such as time wasting, productivity issue, security issue, company data leakage, etc.

now if you’re a system/network administrator and you’re using linux/unix OS families then you might find the following tips useful.

  • prerequisite :
    • linux operating system
    • iptables
    • squid
    • instant messenger ports. in this case, yahoo messenger using port 5050
    • squid port. check your squid.conf to see the port squid use to redirect traffic, by default it’s 3128
    • ethernet interface connected to your LAN
  • just add this rule to your iptables :
    iptables -t nat -A PREROUTING -p tcp -i interfaceLAN --destination-port IMPort -j REDIRECT --to-port SquidPort

    for example with interfaceLAN = eth0, IMPort = 5050, SquidPort = 3128 it will be :
    iptables -t nat -A PREROUTING -p tcp -i eth0 --destination-port 5050 -j REDIRECT --to-port 3128

← Previous

Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*