Blocking p2p software – iptables string moduleBlokowanie programów p2p – iptables moduł string
1. Goal
Block p2p programs.
2. Action
We are useing iptables, netfilter, patch-o-matic module named string and kernel 2.4.2x
1. Cel
Zablokowanie programów p2p.
2. Działanie
Wykorzystujemy iptables, netfilter latke patch-o-matic o nazwie string i kernel 2.4.2x
3. Use
#Kaza
iptables -A FORWARD -p TCP -m string –string „X-Kazaa-” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p UDP -m string –string „KaZaA” -j DROP
iptables -A FORWARD -p UDP -m string –string „fileshare” -j DROP
#Gnutella
iptables -A FORWARD -p TCP -m string –string „GNUTELLA CONNECT/” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „urn:sha1:” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /get/” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /uri-res/” -j REJECT –reject-with tcp-reset
#FileNavigator/Swaptor
iptables -A FORWARD -d cache.filenavigator.com -j DROP
#Blubster
iptables -A FORWARD -p UDP –dport 41170 -j DROP
#GoBoogy
iptables -A FORWARD -p TCP -m string –string „<peerplat>” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /getfilebyhash.cgi?” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /queue_register.cgi?” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /getupdowninfo.cgi?” -j REJECT –reject-with tcp-reset
#Soulseek
iptables -A FORWARD -d server.slsk.org -j DROP
#BitTorrent
iptables -A FORWARD -p TCP -m string –string „BitTorrent protocol” -j REJECT –reject-with tcp-reset
So far, I was able to block those programs. If you know, dear reader, method to block some more P2P software, please send an email with rules.
best wishes
kacper.nowak at bby.com.pl
3. Użycie
#Kaza
iptables -A FORWARD -p TCP -m string –string „X-Kazaa-” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p UDP -m string –string „KaZaA” -j DROP
iptables -A FORWARD -p UDP -m string –string „fileshare” -j DROP
#Gnutella
iptables -A FORWARD -p TCP -m string –string „GNUTELLA CONNECT/” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „urn:sha1:” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /get/” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /uri-res/” -j REJECT –reject-with tcp-reset
#FileNavigator/Swaptor
iptables -A FORWARD -d cache.filenavigator.com -j DROP
#Blubster
iptables -A FORWARD -p UDP –dport 41170 -j DROP
#GoBoogy
iptables -A FORWARD -p TCP -m string –string „<peerplat>” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /getfilebyhash.cgi?” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /queue_register.cgi?” -j REJECT –reject-with tcp-reset
iptables -A FORWARD -p TCP -m string –string „GET /getupdowninfo.cgi?” -j REJECT –reject-with tcp-reset
#Soulseek
iptables -A FORWARD -d server.slsk.org -j DROP
#BitTorrent
iptables -A FORWARD -p TCP -m string –string „BitTorrent protocol” -j REJECT –reject-with tcp-reset
Jak na razie udało mi się zablokować tyle programów. Jeśli znasz, drogi czytelniku, metodę na blokade jakiegoś p2p, którego tutaj nie uwzględniłem to proszę o przesłanie regółek na maila.
pozdrawiam
kacper.nowak at bby.com.pl