modified on 13 November 2008 at 08:16 ••• 10,319 views

Blocking Rapidshare.com web page

From MikroTik Wiki

Jump to: navigation, search

Blocking connection to Rapidshare.com web page.

/system script \
 add name="block_rapidshare" source={ \
 :foreach i in=\
 [ :toarray "62.67.46.0/24,62.67.57.0/24,64.214.225.0/24,64.215.245.0/24,80.129.35.0/24, \
 80.231.56.0/24,80.239.151.0/24,80.239.159.0/24,80.239.226.0/24,80.239.236.0/24, \
 82.129.35.0/24,82.129.36.0/24,82.129.39.0/24,195.122.131.0/24,195.219.1.0/24, \
 206.57.14.0/24,207.138.168.0/24,212.162.2.0/24,212.162.63.0/24"] \
 do={ /ip firewall filter add chain=forward dst-address=$i dst-port=80 protocol=tcp action=drop } \
};


or just paste these rules:

/ip firewall filter
add action=drop chain=forward comment="" disabled=no dst-address=62.67.46.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=62.67.57.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=64.214.225.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=64.215.245.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=80.129.35.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=80.231.56.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=80.239.151.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=80.239.159.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=80.239.226.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=80.239.236.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=82.129.35.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=82.129.36.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=82.129.39.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=195.122.131.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=195.219.1.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=206.57.14.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=207.138.168.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=212.162.2.0/24 dst-port=80 protocol=tcp
add action=drop chain=forward comment="" disabled=no dst-address=212.162.63.0/24 dst-port=80 protocol=tcp

second simple method is to add rules to your firewall:

ip firewall filter add chain=forward content=rapidshare action=drop