Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: rc.local
- # Required-Start: $remote_fs $syslog $all
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop:
- # Short-Description: Run /etc/rc.local if it exist
- ### END INIT INFO
- INET_IFACE="eth0"
- IPT="/sbin/iptables"
- BLACK_IP="103.11.50.34 \
- 46.147.60.64 \
- 109.91.30.16 \
- 114.255.40.38 \
- 116.11.5.112 \
- 118.173.205.117 \
- 119.147.78.6 \
- 119.74.123.88 \
- 119.95.251.108 \
- 121.254.90.62 \
- 121.99.75.243 \
- 122.194.3.167 \
- 123.114.248.63 \
- 123.150.201.15 \
- 123.69.158.153 \
- 124.121.80.123 \
- 124.236.199.215 \
- 125.33.17.142 \
- 128.69.131.175 \
- 14.155.253.37 \
- 142.46.246.115 \
- 151.20.94.20 \
- 171.216.25.79 \
- 171.94.157.118 \
- 173.161.13.5 \
- 173.84.191.52 \
- 174.114.141.214 \
- 174.23.163.202 \
- 174.88.164.11 \
- 175.139.32.240 \
- 177.179.152.136 \
- 178.254.41.194 \
- 183.156.121.86 \
- 183.230.11.43 \
- 184.56.155.27 \
- 184.75.214.10 \
- 188.238.79.72 \
- 189.61.174.181 \
- 190.79.34.112 \
- 197.202.76.143 \
- 2.138.16.41 \
- 202.127.23.209 \
- 211.157.139.180 \
- 202.127.23.209 \
- 211.157.139.180 \
- 212.109.132.199 \
- 212.23.14.74 \
- 217.30.74.99 \
- 218.17.158.250 \
- 218.188.205.54 \
- 222.217.62.194 \
- 222.92.62.197 \
- 223.18.207.193 \
- 223.83.68.96 \
- 223.85.232.215 \
- 24.13.0.156 \
- 24.18.179.76 \
- 46.98.96.161 \
- 47.16.208.68 \
- 49.181.236.99 \
- 5.173.75.162 \
- 5.29.96.120 \
- 58.63.154.94 \
- 59.167.167.150 \
- 59.167.60.3 \
- 59.173.210.175 \
- 61.190.85.145 \
- 65.78.139.63 \
- 66.91.94.146 \
- 67.0.163.127 \
- 68.196.153.140 \
- 70.246.96.127 \
- 71.162.218.111 \
- 71.80.79.76 \
- 72.196.110.136 \
- 74.212.2.186 \
- 75.119.252.127 \
- 75.138.180.0 \
- 75.170.154.61 \
- 76.179.237.169 \
- 76.3.13.136 \
- 77.109.117.130 \
- 78.250.212.174 \
- 78.54.17.31 \
- 79.157.252.12 \
- 79.158.213.14 \
- 79.227.182.167 \
- 82.1.39.128 \
- 83.215.142.159 \
- 83.248.127.132 \
- 83.251.59.222 \
- 83.5.231.96 \
- 83.60.199.134 \
- 84.112.39.24 \
- 84.125.49.238 \
- 84.13.99.162 \
- 84.250.179.230 \
- 84.55.196.131 \
- 84.250.179.230 \
- 84.55.196.131 \
- 85.16.191.23 \
- 86.85.73.186 \
- 87.212.145.237 \
- 88.219.88.69 \
- 92.109.9.115 \
- 93.3.222.186 \
- 94.79.44.51 \
- 95.220.135.224 \
- 95.57.133.203 \
- 95.91.155.5 \
- 96.30.148.81 \
- 97.68.106.36 \
- 98.210.39.121 \
- 99.117.31.40 \
- 99.71.127.242"
- for black in $BLACK_IP
- do
- $IPT -A INPUT -i $INET_IFACE --source $black -j DROP
- done
- PATH=/sbin:/usr/sbin:/bin:/usr/bin
- . /lib/init/vars.sh
- . /lib/lsb/init-functions
- do_start() {
- if [ -x /etc/rc.local ]; then
- [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
- /etc/rc.local
- ES=$?
- [ "$VERBOSE" != no ] && log_end_msg $ES
- return $ES
- fi
- }
- case "$1" in
- start)
- do_start
- ;;
- restart|reload|force-reload)
- echo "Error: argument '$1' not supported" >&2
- exit 3
- ;;
- stop)
- ;;
- *)
- echo "Usage: $0 start|stop" >&2
- exit 3
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement