Advertisement
Guest User

Untitled

a guest
May 20th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.51 KB | None | 0 0
  1. ASUSWRT-Merlin RT-AC3200 380.66-2 Wed May 17 03:01:13 UTC 2017
  2. admin@RT-AC3200-7180:/tmp/home/root# wget -O /jffs/scripts/firewall https://raw.
  3. githubusercontent.com/Adamm00/IPSet_ASUS/master/firewall.sh
  4. --2017-05-20 18:06:00-- https://raw.githubusercontent.com/Adamm00/IPSet_ASUS/master/firewall.sh
  5. Resolving raw.githubusercontent.com... 151.101.112.133
  6. Connecting to raw.githubusercontent.com|151.101.112.133|:443... connected.
  7. HTTP request sent, awaiting response... 200 OK
  8. Length: 31308 (31K) [text/plain]
  9. Saving to: '/jffs/scripts/firewall'
  10.  
  11. /jffs/scripts/firew 100%[=====================>] 30.57K --.-KB/s in 0.05s
  12.  
  13. 2017-05-20 18:06:01 (660 KB/s) - '/jffs/scripts/firewall' saved [31308/31308]
  14.  
  15. admin@RT-AC3200-7180:/tmp/home/root# chmod +x /jffs/scripts/firewall
  16. admin@RT-AC3200-7180:/tmp/home/root# sh /jffs/scripts/firewall install
  17. #!/bin/sh
  18. #############################################################################################################
  19. # _____ _ _ _ _ #
  20. # / ____| | | | | || | #
  21. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  22. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  23. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  24. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  25. # __/ | #
  26. # |___/ #
  27. # #
  28. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  29. ## https://github.com/Adamm00/IPSet_ASUS #
  30. ###################################################################################################################
  31. ### ----- Make Sure To Edit The Following Files ----- #
  32. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  33. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  34. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  35. ###################################################################################################################
  36.  
  37. ##############################
  38. ### Commands ###
  39. ##############################
  40. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  41. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  42. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  43. # "banmalware" # <-- Bans Various Malware Domains
  44. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  45. # "import" # <-- Import And Merge IPSet Save To Firewall
  46. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  47. # "disable" # <-- Disable Firewall
  48. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  49. # "update" # <-- Update Script To Latest Version (check github for changes)
  50. # "start" # <-- Initiate Firewall
  51. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  52. # "install" # <-- Install Script (Or Change Boot Args)
  53. # "uninstall" # <-- Uninstall All Traces Of Script
  54. ##############################
  55.  
  56. Installing Skynet v4.2.8
  57. This Will Remove Any Old Install Arguements And Can Be Run Multiple Times
  58. Please Select Installation Mode (Number)
  59. 1. Vanilla - Default Installation
  60. 2. NoAuto - Default Installation Without Autobanning
  61. 3. Debug - Default Installation With Debug Print For Extended Stat Reporting
  62. 4. NoAuto & Debug - Default Installation With No Autobanning And Debug Print
  63.  
  64. 3
  65. Debug Selected
  66.  
  67. Would You Like To Enable Weekly Malwarelist Updating
  68. 1. Yes
  69. 2. No
  70. Please Select Option (Number)
  71. 1
  72. Malware List Updating Enabled
  73. Malware Updates Scheduled For 1.25am Every Monday
  74.  
  75. Would You Like To Enable Daily Auto Script Updating
  76. Skynet By Default Only Checks For Updates But They Are Never Downloaded
  77.  
  78. 1. Yes
  79. 2. No
  80. Please Select Option (Number)
  81. 1
  82. Auto Updating Enabled
  83. Skynet Updates Scheduled For 2.25am Daily
  84.  
  85. Restarting Firewall To Apply Changes
  86.  
  87. Done.
  88.  
  89. admin@RT-AC3200-7180:/jffs/scripts# ./firewall stats
  90. #!/bin/sh
  91. #############################################################################################################
  92. # _____ _ _ _ _ #
  93. # / ____| | | | | || | #
  94. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  95. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  96. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  97. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  98. # __/ | #
  99. # |___/ #
  100. # #
  101. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  102. ## https://github.com/Adamm00/IPSet_ASUS #
  103. ###################################################################################################################
  104. ### ----- Make Sure To Edit The Following Files ----- #
  105. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  106. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  107. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  108. ###################################################################################################################
  109.  
  110. ##############################
  111. ### Commands ###
  112. ##############################
  113. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  114. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  115. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  116. # "banmalware" # <-- Bans Various Malware Domains
  117. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  118. # "import" # <-- Import And Merge IPSet Save To Firewall
  119. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  120. # "disable" # <-- Disable Firewall
  121. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  122. # "update" # <-- Update Script To Latest Version (check github for changes)
  123. # "start" # <-- Initiate Firewall
  124. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  125. # "install" # <-- Install Script (Or Change Boot Args)
  126. # "uninstall" # <-- Uninstall All Traces Of Script
  127. ##############################
  128.  
  129.  
  130. !!! Debug Mode Is Disabled !!!
  131. To Enable Use 'sh ./firewall install'
  132.  
  133. No Debug Data Detected - Give This Time To Generate
  134.  
  135. admin@RT-AC3200-7180:/jffs/scripts# sh ./firewall install
  136. #!/bin/sh
  137. #############################################################################################################
  138. # _____ _ _ _ _ #
  139. # / ____| | | | | || | #
  140. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  141. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  142. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  143. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  144. # __/ | #
  145. # |___/ #
  146. # #
  147. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  148. ## https://github.com/Adamm00/IPSet_ASUS #
  149. ###################################################################################################################
  150. ### ----- Make Sure To Edit The Following Files ----- #
  151. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  152. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  153. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  154. ###################################################################################################################
  155.  
  156. ##############################
  157. ### Commands ###
  158. ##############################
  159. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  160. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  161. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  162. # "banmalware" # <-- Bans Various Malware Domains
  163. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  164. # "import" # <-- Import And Merge IPSet Save To Firewall
  165. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  166. # "disable" # <-- Disable Firewall
  167. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  168. # "update" # <-- Update Script To Latest Version (check github for changes)
  169. # "start" # <-- Initiate Firewall
  170. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  171. # "install" # <-- Install Script (Or Change Boot Args)
  172. # "uninstall" # <-- Uninstall All Traces Of Script
  173. ##############################
  174.  
  175. Installing Skynet v4.2.8
  176. This Will Remove Any Old Install Arguements And Can Be Run Multiple Times
  177. Please Select Installation Mode (Number)
  178. 1. Vanilla - Default Installation
  179. 2. NoAuto - Default Installation Without Autobanning
  180. 3. Debug - Default Installation With Debug Print For Extended Stat Reporting
  181. 4. NoAuto & Debug - Default Installation With No Autobanning And Debug Print
  182.  
  183. 3
  184. Debug Selected
  185.  
  186. Would You Like To Enable Weekly Malwarelist Updating
  187. 1. Yes
  188. 2. No
  189. Please Select Option (Number)
  190. 1
  191. Malware List Updating Enabled
  192. Malware Updates Scheduled For 1.25am Every Monday
  193.  
  194. Would You Like To Enable Daily Auto Script Updating
  195. Skynet By Default Only Checks For Updates But They Are Never Downloaded
  196.  
  197. 1. Yes
  198. 2. No
  199. Please Select Option (Number)
  200. 1
  201. Auto Updating Enabled
  202. Skynet Updates Scheduled For 2.25am Daily
  203.  
  204. Restarting Firewall To Apply Changes
  205.  
  206. Done.
  207. admin@RT-AC3200-7180:/jffs/scripts# firewall stats
  208. #!/bin/sh
  209. #############################################################################################################
  210. # _____ _ _ _ _ #
  211. # / ____| | | | | || | #
  212. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  213. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  214. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  215. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  216. # __/ | #
  217. # |___/ #
  218. # #
  219. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  220. ## https://github.com/Adamm00/IPSet_ASUS #
  221. ###################################################################################################################
  222. ### ----- Make Sure To Edit The Following Files ----- #
  223. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  224. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  225. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  226. ###################################################################################################################
  227.  
  228. ##############################
  229. ### Commands ###
  230. ##############################
  231. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  232. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  233. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  234. # "banmalware" # <-- Bans Various Malware Domains
  235. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  236. # "import" # <-- Import And Merge IPSet Save To Firewall
  237. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  238. # "disable" # <-- Disable Firewall
  239. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  240. # "update" # <-- Update Script To Latest Version (check github for changes)
  241. # "start" # <-- Initiate Firewall
  242. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  243. # "install" # <-- Install Script (Or Change Boot Args)
  244. # "uninstall" # <-- Uninstall All Traces Of Script
  245. ##############################
  246.  
  247. No Debug Data Detected - Give This Time To Generate
  248. admin@RT-AC3200-7180:/jffs/scripts# firewall banmalware
  249. #!/bin/sh
  250. #############################################################################################################
  251. # _____ _ _ _ _ #
  252. # / ____| | | | | || | #
  253. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  254. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  255. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  256. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  257. # __/ | #
  258. # |___/ #
  259. # #
  260. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  261. ## https://github.com/Adamm00/IPSet_ASUS #
  262. ###################################################################################################################
  263. ### ----- Make Sure To Edit The Following Files ----- #
  264. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  265. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  266. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  267. ###################################################################################################################
  268.  
  269. ##############################
  270. ### Commands ###
  271. ##############################
  272. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  273. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  274. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  275. # "banmalware" # <-- Bans Various Malware Domains
  276. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  277. # "import" # <-- Import And Merge IPSet Save To Firewall
  278. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  279. # "disable" # <-- Disable Firewall
  280. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  281. # "update" # <-- Update Script To Latest Version (check github for changes)
  282. # "start" # <-- Initiate Firewall
  283. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  284. # "install" # <-- Install Script (Or Change Boot Args)
  285. # "uninstall" # <-- Uninstall All Traces Of Script
  286. ##############################
  287.  
  288. Banning Known Malware IPs
  289. To Use A Custom List In Future Use; "sh /opt/bin/firewall banmalware URL"
  290. Removing Previous Malware Bans
  291. Downloading Lists
  292. Filtering IPv4 Addresses
  293. Filtering IPv4 Ranges
  294. Applying Blacklists
  295. Warning; This May Have Blocked Your Favorite Torrent Website
  296. To Whitelist It Use; "sh /opt/bin/firewall whitelist domain URL"
  297. Skynet: [Complete] 140080 IPs / 5197 Ranges banned. 140080 New IPs / 5197 New Ranges Banned. 0 IP / 0 Range Connections Blocked! [47s]
  298. admin@RT-AC3200-7180:/jffs/scripts# firewall ban country "cn ua mk"
  299. #!/bin/sh
  300. #############################################################################################################
  301. # _____ _ _ _ _ #
  302. # / ____| | | | | || | #
  303. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  304. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  305. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  306. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  307. # __/ | #
  308. # |___/ #
  309. # #
  310. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  311. ## https://github.com/Adamm00/IPSet_ASUS #
  312. ###################################################################################################################
  313. ### ----- Make Sure To Edit The Following Files ----- #
  314. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  315. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  316. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  317. ###################################################################################################################
  318.  
  319. ##############################
  320. ### Commands ###
  321. ##############################
  322. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  323. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  324. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  325. # "banmalware" # <-- Bans Various Malware Domains
  326. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  327. # "import" # <-- Import And Merge IPSet Save To Firewall
  328. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  329. # "disable" # <-- Disable Firewall
  330. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  331. # "update" # <-- Update Script To Latest Version (check github for changes)
  332. # "start" # <-- Initiate Firewall
  333. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  334. # "install" # <-- Install Script (Or Change Boot Args)
  335. # "uninstall" # <-- Uninstall All Traces Of Script
  336. ##############################
  337.  
  338. Removing Previous Country Bans
  339. Banning Known IP Ranges For cn ua mk
  340. Downloading Lists
  341. Filtering IPv4 Ranges
  342. Applying Blacklists
  343. Skynet: [Complete] 140080 IPs / 16060 Ranges banned. 0 New IPs / 10863 New Ranges Banned. 0 IP / 0 Range Connections Blocked! [10s]
  344. admin@RT-AC3200-7180:/jffs/scripts# firewall save
  345. #!/bin/sh
  346. #############################################################################################################
  347. # _____ _ _ _ _ #
  348. # / ____| | | | | || | #
  349. # | (___ | | ___ _ _ __ ___| |_ __ _| || |_ #
  350. # \___ \| |/ / | | | '_ \ / _ \ __| \ \ / /__ _| #
  351. # ____) | <| |_| | | | | __/ |_ \ V / | | #
  352. # |_____/|_|\_\\__, |_| |_|\___|\__| \_(_) |_| #
  353. # __/ | #
  354. # |___/ #
  355. # #
  356. ## - 20/05/2017 - Asus Firewall Addition By Adamm v4.2.8 #
  357. ## https://github.com/Adamm00/IPSet_ASUS #
  358. ###################################################################################################################
  359. ### ----- Make Sure To Edit The Following Files ----- #
  360. ### /jffs/scripts/firewall-start <-- Sets up cronjob/initial execution #
  361. ### /jffs/scripts/firewall <-- Blacklists IP's From /jffs/scripts/ipset.txt #
  362. ### /jffs/scripts/ipset.txt <-- Banned IP List/IPSet Rules #
  363. ###################################################################################################################
  364.  
  365. ##############################
  366. ### Commands ###
  367. ##############################
  368. # "unban" # <-- Remove Entry From Blacklist (IP/Range/Domain/Port/Country/Malware/All)
  369. # "save" # <-- Save Blacklists To /jffs/scripts/ipset.txt
  370. # "ban" # <-- Adds Entry To Blacklist (IP/Range/Domain/Port/Country)
  371. # "banmalware" # <-- Bans Various Malware Domains
  372. # "whitelist" # <-- Add Entry To Whitelist (IP/Range/Domain/Remove)
  373. # "import" # <-- Import And Merge IPSet Save To Firewall
  374. # "deport" # <-- Remove All IPs From IPSet Save From Firewall
  375. # "disable" # <-- Disable Firewall
  376. # "debug" # <-- Specific Debug Features (Restart/Disable/Filter/Info)
  377. # "update" # <-- Update Script To Latest Version (check github for changes)
  378. # "start" # <-- Initiate Firewall
  379. # "stats" # <-- Print/Search Stats Of Recently Banned IPs (Requires debugging enabled)
  380. # "install" # <-- Install Script (Or Change Boot Args)
  381. # "uninstall" # <-- Uninstall All Traces Of Script
  382. ##############################
  383.  
  384. [Saving Blacklists] ... ... ...
  385. Skynet: [Complete] 140080 IPs / 16060 Ranges banned. 0 New IPs / 0 New Ranges Banned. 0 IP / 0 Range Connections Blocked! [7s]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement