Block MSN and other messengers on your network

This is my iptables config stored under /etc/sysconfig/iptables :
(eth0 = WAN if, eth1 = LAN if)

You’ll notice is allowed to connect to any services


# Basic protections against syn floods and other stuff
-A FORWARD -p tcp –syn -m limit –limit 1/s -j ACCEPT
-A FORWARD -p tcp –tcp-flags SYN,ACK,FIN,RST RST -m limit –limit 1/s -j ACCEPT
-A FORWARD -p icmp –icmp-type echo-request -m limit –limit 1/s -j ACCEPT

# Block MSN
-I FORWARD -s -p tcp -m tcp –dport 1863 -j DROP
-I FORWARD -s -p tcp -m tcp –dport 1863 -j LOG –log-prefix “MESSENGER MSN > ”
-I FORWARD -s -p tcp -m tcp –dport 1863 -j ACCEPT

# Block AIM/ICQ
-I FORWARD -s -d -j DROP
-I FORWARD -s -d -j LOG –log-prefix “MESSENGER ICQ/AIM > ”

# Block Yahoo IM
-I FORWARD -s -d -j DROP
-I FORWARD -s -d -j LOG –log-prefix “MESSENGER YIM > ”

# Allowing anything else
-A FORWARD -i eth1 -o eth0 -m state –state NEW,ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -m state –state ESTABLISHED,RELATED -j ACCEPT

Read more at Sébastien Wains homepage


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s