#!/bin/sh
#
## Flush rules & reset counters
iptables -F
iptables -Z
iptables -X
iptables -t nat -F
iptables -t nat -Z
iptables -t nat -X
#
## Set policies
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT DROP
#
## Pass all locally-originating packets
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
#
## Allow transparence proxy
#iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
#
## Accept ICMP ping echo requests
## (this allows other people to ping your machine, among other things),
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
#iptables -t nat -A POSTROUTING -s 192.168.130.0/24  -j MASQUERADE
iptables -I INPUT -s 61.166.74.0/24 -j DROP
iptables -I INPUT -s 116.249.168.0/24 -j DROP
iptables -I INPUT -s 182.243.117.0/24 -j DROP
iptables -I INPUT -s 106.57.47.0/24 -j DROP
iptables -I INPUT -s 106.57.33.0/24 -j DROP
iptables -I INPUT -s 182.243.105.0/24 -j DROP
iptables -I INPUT -s 183.244.176.0/24 -j DROP
iptables -I INPUT -s 183.225.180.0/24 -j DROP
iptables -I INPUT -s 39.128.188.0/24 -j DROP
