Advertisement
Guest User

EXECUTE@ubuntu ==> sudo nano /etc/init.d/rc.local & REPLACE

a guest
Dec 23rd, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: rc.local
  4. # Required-Start: $remote_fs $syslog $all
  5. # Required-Stop:
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop:
  8. # Short-Description: Run /etc/rc.local if it exist
  9. ### END INIT INFO
  10.  
  11. INET_IFACE="eth0"
  12. IPT="/sbin/iptables"
  13. BLACK_IP="103.11.50.34 \
  14. 46.147.60.64 \
  15. 109.91.30.16 \
  16. 114.255.40.38 \
  17. 116.11.5.112 \
  18. 118.173.205.117 \
  19. 119.147.78.6 \
  20. 119.74.123.88 \
  21. 119.95.251.108 \
  22. 121.254.90.62 \
  23. 121.99.75.243 \
  24. 122.194.3.167 \
  25. 123.114.248.63 \
  26. 123.150.201.15 \
  27. 123.69.158.153 \
  28. 124.121.80.123 \
  29. 124.236.199.215 \
  30. 125.33.17.142 \
  31. 128.69.131.175 \
  32. 14.155.253.37 \
  33. 142.46.246.115 \
  34. 151.20.94.20 \
  35. 171.216.25.79 \
  36. 171.94.157.118 \
  37. 173.161.13.5 \
  38. 173.84.191.52 \
  39. 174.114.141.214 \
  40. 174.23.163.202 \
  41. 174.88.164.11 \
  42. 175.139.32.240 \
  43. 177.179.152.136 \
  44. 178.254.41.194 \
  45. 183.156.121.86 \
  46. 183.230.11.43 \
  47. 184.56.155.27 \
  48. 184.75.214.10 \
  49. 188.238.79.72 \
  50. 189.61.174.181 \
  51. 190.79.34.112 \
  52. 197.202.76.143 \
  53. 2.138.16.41 \
  54. 202.127.23.209 \
  55. 211.157.139.180 \
  56. 202.127.23.209 \
  57. 211.157.139.180 \
  58. 212.109.132.199 \
  59. 212.23.14.74 \
  60. 217.30.74.99 \
  61. 218.17.158.250 \
  62. 218.188.205.54 \
  63. 222.217.62.194 \
  64. 222.92.62.197 \
  65. 223.18.207.193 \
  66. 223.83.68.96 \
  67. 223.85.232.215 \
  68. 24.13.0.156 \
  69. 24.18.179.76 \
  70. 46.98.96.161 \
  71. 47.16.208.68 \
  72. 49.181.236.99 \
  73. 5.173.75.162 \
  74. 5.29.96.120 \
  75. 58.63.154.94 \
  76. 59.167.167.150 \
  77. 59.167.60.3 \
  78. 59.173.210.175 \
  79. 61.190.85.145 \
  80. 65.78.139.63 \
  81. 66.91.94.146 \
  82. 67.0.163.127 \
  83. 68.196.153.140 \
  84. 70.246.96.127 \
  85. 71.162.218.111 \
  86. 71.80.79.76 \
  87. 72.196.110.136 \
  88. 74.212.2.186 \
  89. 75.119.252.127 \
  90. 75.138.180.0 \
  91. 75.170.154.61 \
  92. 76.179.237.169 \
  93. 76.3.13.136 \
  94. 77.109.117.130 \
  95. 78.250.212.174 \
  96. 78.54.17.31 \
  97. 79.157.252.12 \
  98. 79.158.213.14 \
  99. 79.227.182.167 \
  100. 82.1.39.128 \
  101. 83.215.142.159 \
  102. 83.248.127.132 \
  103. 83.251.59.222 \
  104. 83.5.231.96 \
  105. 83.60.199.134 \
  106. 84.112.39.24 \
  107. 84.125.49.238 \
  108. 84.13.99.162 \
  109. 84.250.179.230 \
  110. 84.55.196.131 \
  111. 84.250.179.230 \
  112. 84.55.196.131 \
  113. 85.16.191.23 \
  114. 86.85.73.186 \
  115. 87.212.145.237 \
  116. 88.219.88.69 \
  117. 92.109.9.115 \
  118. 93.3.222.186 \
  119. 94.79.44.51 \
  120. 95.220.135.224 \
  121. 95.57.133.203 \
  122. 95.91.155.5 \
  123. 96.30.148.81 \
  124. 97.68.106.36 \
  125. 98.210.39.121 \
  126. 99.117.31.40 \
  127. 99.71.127.242"
  128.  
  129. for black in $BLACK_IP
  130. do
  131. $IPT -A INPUT -i $INET_IFACE --source $black -j DROP
  132. done
  133.  
  134.  
  135. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  136.  
  137. . /lib/init/vars.sh
  138. . /lib/lsb/init-functions
  139.  
  140. do_start() {
  141. if [ -x /etc/rc.local ]; then
  142. [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
  143. /etc/rc.local
  144. ES=$?
  145. [ "$VERBOSE" != no ] && log_end_msg $ES
  146. return $ES
  147. fi
  148. }
  149.  
  150. case "$1" in
  151. start)
  152. do_start
  153. ;;
  154. restart|reload|force-reload)
  155. echo "Error: argument '$1' not supported" >&2
  156. exit 3
  157. ;;
  158. stop)
  159. ;;
  160. *)
  161. echo "Usage: $0 start|stop" >&2
  162. exit 3
  163. ;;
  164. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement