All pastes #931104 Raw Edit

Reject incoming theplanet.com, a

public text v1 · immutable
·published 2008-03-06 23:24 UTC
rendered paste body
#!/bin/bash
#
iptables=/sbin/iptables
blocks="207.218.192.0/18 \
216.12.192.0/19 \
216.234.224.0/19 \
216.185.96.0/19 \
216.40.192.0/18 \
69.41.224.0/19 \
64.246.0.0/18 \
216.127.64.0/19 \
207.44.128.0/17 \
64.5.32.0/19 \
69.56.128.0/17 \
66.98.128.0/17 \
69.57.128.0/19 \
69.93.0.0/16 \
67.15.0.0/16 \
67.18.0.0/15 \
70.84.0.0/14 \
209.85.0.0/17 \
74.52.0.0/14 \
209.62.0.0/17 \
75.125.0.0/16"

for i in $blocks
do
        $iptables -A INPUT -p tcp -d 0/0 -s $i --sport 80 --dport 513:65535 -m state --state ESTABLISHED -j ACCEPT
        $iptables -A INPUT -p tcp -d 0/0 -s $i --sport 6666:6669 --dport 513:65535 -m state --state ESTABLISHED -j ACCEPT
        $iptables -A INPUT -p udp -d 0/0 -s $i --sport 80 --dport 513:65535 -m state --state ESTABLISHED -j ACCEPT
        $iptables -A INPUT -p tcp -s $i -j DROP
        $iptables -A INPUT -p udp -s $i -j DROP

done