Undesirable
Occasional Visitor
Oh, I thought you had to type in the full range of country abbriviations to be banned every time.Can't you start another ban with 'sb' on?
Oh, I thought you had to type in the full range of country abbriviations to be banned every time.Can't you start another ban with 'sb' on?
How do you enter that number of country codes into the script? PuTTY limits my character input when I'm at the 'Input Country Abbreviations To Ban' command. I can only type up to "SA".
Oh, I thought you had to type in the full range of country abbriviations to be banned every time.
Hi! I want to block certain site that no one can't enter tried, outbound and inbound, browser, ftp, all ports.
Code:sh /jffs/scripts/firewall ban domain rn-tv.com
and all other possible not working still opening the site.
I suspect a configuration issue with putty ???I’ve never used Putty before so I’m not sure. I have no issue with using my default Terminal app in MacOS.
It's an UbiSoft game.haha I thought the same thing. 34 countries banned here yet suprisingly it hasn't broken my net, nor gaming. If you want a laugh ban these countries and load up Watchdogs 2 on PS4 and see how many outbound blocks you get to all the shadiest countries. Guessing their online play operates p2p and it's hitting the ip addresses of other players as opposed to only the ip of a central server.
Code:af br cd cu ee eg et il iq ir kp kw ky kz lb md ng pk ps qa ru sa sb sd so ss sy tr ua ug vn ye zw cn
I suspect a configuration issue with putty ???
Else use 'Xshell 6' which is free for Home/School use and works perfectly. [www.netsarang.com].
(As used by 'thelonelycoder' .... See https://diversion.ch/diversion/use/development-tools.html)
I am able to copy the full list and paste it into the input with no problems !!!
Hi! I want to block certain site that no one can't enter tried, outbound and inbound, browser, ftp, all ports.
Code:sh /jffs/scripts/firewall ban domain rn-tv.com
and all other possible not working still opening the site.
skynet@RT-AX88U-DC28:/tmp/home/root# nslookup rn-tv.com
Server: 127.0.0.1
Address 1: 127.0.0.1 localhost.localdomain
Name: rn-tv.com
Address 1: 104.28.2.47
Address 2: 104.28.3.47
Address 3: 2606:4700:30::681c:32f
Address 4: 2606:4700:30::681c:22f
skynet@RT-AX88U-DC28:/tmp/home/root# firewall stats search ip 104.28.2.47
#############################################################################################################
# _____ _ _ __ #
# / ____| | | | / / #
# | (___ | | ___ _ _ __ ___| |_ __ __/ /_ #
# \___ \| |/ / | | | '_ \ / _ \ __| \ \ / / '_ \ #
# ____) | <| |_| | | | | __/ |_ \ V /| (_) | #
# |_____/|_|\_\\__, |_| |_|\___|\__| \_/ \___/ #
# __/ | #
# |___/ #
# #
## - 17/03/2019 - Asus Firewall Addition By Adamm v6.8.2 #
## https://github.com/Adamm00/IPSet_ASUS #
#############################################################################################################
=============================================================================================================
[i] Debug Data Detected in /tmp/mnt/USB/skynet/skynet.log - 996.0K
[i] Monitoring From Mar 16 18:58:56 To Mar 17 13:31:55
[i] 4268 Block Events Detected
[i] 652 Unique IPs
[i] 1 Manual Bans Issued
104.28.2.47 is in set Skynet-Whitelist.
104.28.2.47 is NOT in set Skynet-Blacklist.
104.28.2.47 is NOT in set Skynet-BlockedRanges.
Whitelist Reason;
*--
Associated Domain(s);
rn-tv.com
[i] IP Location - Canada (Cloudflare, Inc. / AS13335)
[1;31mTop 10 Blocks (Inbound);[0m
-------- | -------------- | -------------- | -------------- | ----------------------
| Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------- | -------------- | -------------- | -------------- | ----------------------
[1;32m-*-[0m[1;32m--*[0m [1;32m*--[0m3x | 92.118.37.61 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.61 | BanMalware: normshield_high_attack.ipset |
[1;32m-*-[0m[1;32m--*[0m [1;32m*--[0m2x | 185.176.27.110 (BG) | https://otx.alienvault.com/indicator/ip/185.176.27.110 | BanMalware: blocklist_net_ua.ipset |
[1;32m-*-[0m[1;32m--*[0m2x | 130.117.72.42 (NL) | https://otx.alienvault.com/indicator/ip/130.117.72.42 | BanMalware: firehol_level3.netset |
[1;32m*--[0m[1;32m-*-[0m1x | 92.63.196.17 (RU) | https://otx.alienvault.com/indicator/ip/92.63.196.17 | BanMalware: normshield_high_attack.ipset |
[1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 92.118.37.91 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.91 | BanMalware: normshield_high_attack.ipset |
[1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 92.118.37.38 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.38 | BanMalware: normshield_high_attack.ipset |
[1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m[1;32m--*[0m1x | 92.118.37.35 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.35 | BanMalware: normshield_high_attack.ipset |
[1;32m*--[0m[1;32m-*-[0m1x | 89.248.162.168 (NL) | https://otx.alienvault.com/indicator/ip/89.248.162.168 | BanMalware: normshield_high_attack.ipset |
[1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 88.204.240.248 (KZ) | https://otx.alienvault.com/indicator/ip/88.204.240.248 | BanMalware: taichung.ipset |
[1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 81.22.45.231 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.231 | BanMalware: alienvault_reputation.ipset |
=============================================================================================================
Yes, see this post from Adamm.Is there any way to remove the formatting from the stats output?
I am running commands to the router using plink and dumping them to a txt file for easier checking of things.
Thing is it chokes on color formatting.
Code:[1;31mTop 10 Blocks (Inbound);[0m -------- | -------------- | -------------- | -------------- | ---------------------- | Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains | -------- | -------------- | -------------- | -------------- | ---------------------- [1;32m-*-[0m[1;32m--*[0m [1;32m*--[0m3x | 92.118.37.61 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.61 | BanMalware: normshield_high_attack.ipset | [1;32m-*-[0m[1;32m--*[0m [1;32m*--[0m2x | 185.176.27.110 (BG) | https://otx.alienvault.com/indicator/ip/185.176.27.110 | BanMalware: blocklist_net_ua.ipset | [1;32m-*-[0m[1;32m--*[0m2x | 130.117.72.42 (NL) | https://otx.alienvault.com/indicator/ip/130.117.72.42 | BanMalware: firehol_level3.netset | [1;32m*--[0m[1;32m-*-[0m1x | 92.63.196.17 (RU) | https://otx.alienvault.com/indicator/ip/92.63.196.17 | BanMalware: normshield_high_attack.ipset | [1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 92.118.37.91 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.91 | BanMalware: normshield_high_attack.ipset | [1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 92.118.37.38 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.38 | BanMalware: normshield_high_attack.ipset | [1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m[1;32m--*[0m1x | 92.118.37.35 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.35 | BanMalware: normshield_high_attack.ipset | [1;32m*--[0m[1;32m-*-[0m1x | 89.248.162.168 (NL) | https://otx.alienvault.com/indicator/ip/89.248.162.168 | BanMalware: normshield_high_attack.ipset | [1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 88.204.240.248 (KZ) | https://otx.alienvault.com/indicator/ip/88.204.240.248 | BanMalware: taichung.ipset | [1;32m--*[0m [1;32m*--[0m[1;32m-*-[0m1x | 81.22.45.231 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.231 | BanMalware: alienvault_reputation.ipset | =============================================================================================================
Almost works. Still get some crazyness.Yes, see this post from Adamm.
https://www.snbforums.com/threads/r...urity-enhancements.16798/page-210#post-468351
=============================================================================================================
[1;31mTop 10 Blocks (Inbound);
-------- | -------------- | -------------- | -------------- | ----------------------
| Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------- | -------------- | -------------- | -------------- | ----------------------
[1;32m-*-
[1;32m--*
[1;32m*--
3x | 92.118.37.61 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.61 | BanMalware: normshield_high_attack.ipset |
[1;32m-*-
[1;32m--*
[1;32m*--
2x | 81.22.45.231 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.231 | BanMalware: alienvault_reputation.ipset |
[1;32m-*-
[1;32m--*
2x | 81.22.45.193 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.193 | BanMalware: alienvault_reputation.ipset |
[1;32m*--
[1;32m-*-
2x | 185.176.27.110 (BG) | https://otx.alienvault.com/indicator/ip/185.176.27.110 | BanMalware: blocklist_net_ua.ipset |
[1;32m--*
[1;32m*--
[1;32m-*-
2x | 130.117.72.42 (NL) | https://otx.alienvault.com/indicator/ip/130.117.72.42 | BanMalware: firehol_level3.netset |
[1;32m--*
[1;32m*--
1x | 92.63.197.100 (UA) | https://otx.alienvault.com/indicator/ip/92.63.197.100 | BanMalware: normshield_high_bruteforce.ipset |
[1;32m-*-
[1;32m--*
1x | 92.63.196.17 (RU) | https://otx.alienvault.com/indicator/ip/92.63.196.17 | BanMalware: normshield_high_attack.ipset |
[1;32m*--
[1;32m-*-
[1;32m--*
1x | 92.118.37.91 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.91 | BanMalware: normshield_high_attack.ipset |
[1;32m*--
[1;32m-*-
[1;32m--*
1x | 92.118.37.81 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.81 | BanMalware: firehol_level3.netset |
[1;32m*--
[1;32m-*-
[1;32m--*
1x | 92.118.37.38 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.38 | BanMalware: normshield_high_attack.ipset |
=============================================================================================================
Darn, something changed since that post, I tried back then just to learn. Now it is above my pay grade, so someone else will know.Almost works. Still get some crazyness.
Code:============================================================================================================= [1;31mTop 10 Blocks (Inbound); -------- | -------------- | -------------- | -------------- | ---------------------- | Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains | -------- | -------------- | -------------- | -------------- | ---------------------- [1;32m-*- [1;32m--* [1;32m*-- 3x | 92.118.37.61 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.61 | BanMalware: normshield_high_attack.ipset | [1;32m-*- [1;32m--* [1;32m*-- 2x | 81.22.45.231 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.231 | BanMalware: alienvault_reputation.ipset | [1;32m-*- [1;32m--* 2x | 81.22.45.193 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.193 | BanMalware: alienvault_reputation.ipset | [1;32m*-- [1;32m-*- 2x | 185.176.27.110 (BG) | https://otx.alienvault.com/indicator/ip/185.176.27.110 | BanMalware: blocklist_net_ua.ipset | [1;32m--* [1;32m*-- [1;32m-*- 2x | 130.117.72.42 (NL) | https://otx.alienvault.com/indicator/ip/130.117.72.42 | BanMalware: firehol_level3.netset | [1;32m--* [1;32m*-- 1x | 92.63.197.100 (UA) | https://otx.alienvault.com/indicator/ip/92.63.197.100 | BanMalware: normshield_high_bruteforce.ipset | [1;32m-*- [1;32m--* 1x | 92.63.196.17 (RU) | https://otx.alienvault.com/indicator/ip/92.63.196.17 | BanMalware: normshield_high_attack.ipset | [1;32m*-- [1;32m-*- [1;32m--* 1x | 92.118.37.91 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.91 | BanMalware: normshield_high_attack.ipset | [1;32m*-- [1;32m-*- [1;32m--* 1x | 92.118.37.81 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.81 | BanMalware: firehol_level3.netset | [1;32m*-- [1;32m-*- [1;32m--* 1x | 92.118.37.38 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.38 | BanMalware: normshield_high_attack.ipset | =============================================================================================================
Almost works. Still get some crazyness.
skynet@RT-AX88U-DC28:/tmp/home/root# sh /jffs/scripts/firewall stats | sed -r 's/'$(echo -e "\033")'\[[0-9]{1,2}(;([0-9]{1,2})?)?[mK]//g' | strings
[?7l
[J#############################################################################################################
# _____ _ _ __ #
# / ____| | | | / / #
# | (___ | | ___ _ _ __ ___| |_ __ __/ /_ #
# \___ \| |/ / | | | '_ \ / _ \ __| \ \ / / '_ \ #
# ____) | <| |_| | | | | __/ |_ \ V /| (_) | #
# |_____/|_|\_\\__, |_| |_|\___|\__| \_/ \___/ #
# __/ | #
# |___/ #
# #
-snip-
=============================================================================================================
Last 10 Unique Connections Blocked (Inbound);
-------------- | -------------- | -------------- | ----------------------
| IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------------- | -------------- | -------------- | ----------------------
92.118.37.47 (GR) | https://otx.alienvault.com/indicator/ip/92.118.37.47 | BanMalware: normshield_high_attack.ipset |
88.214.26.55 (SC) | https://otx.alienvault.com/indicator/ip/88.214.26.55 | BanMalware: firehol_level3.netset* |
185.254.122.12 (LT) | https://otx.alienvault.com/indicator/ip/185.254.122.12 | BanMalware: firehol_level3.netset* |
193.32.160.35 (NL) | https://otx.alienvault.com/indicator/ip/193.32.160.35 | BanMalware: alienvault_reputation.ipset |
185.153.196.142 (MD) | https://otx.alienvault.com/indicator/ip/185.153.196.142 | BanMalware: firehol_level3.netset* |
185.176.27.118 (BG) | https://otx.alienvault.com/indicator/ip/185.176.27.118 | BanMalware: normshield_high_attack.ipset |
5.188.206.34 (BG) | https://otx.alienvault.com/indicator/ip/5.188.206.34 | BanMalware: firehol_level3.netset* |
185.25.204.80 (IT) | https://otx.alienvault.com/indicator/ip/185.25.204.80 | BanMalware: taichung.ipset |
107.170.203.150 (US) | https://otx.alienvault.com/indicator/ip/107.170.203.150 | BanMalware: taichung.ipset |
81.22.45.228 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.228 | BanMalware: spamhaus_edrop.netset* |
=============================================================================================================
Last 10 Unique Connections Blocked (Outbound);
-------------- | -------------- | -------------- | ----------------------
| IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------------- | -------------- | -------------- | ----------------------
8.8.8.8 (US) | https://otx.alienvault.com/indicator/ip/8.8.8.8 | ManualBan: ffffffffffffffffffffffffffffffffff |
=============================================================================================================
Last 10 Manual Bans;
-------------- | -------------- | -------------- | ----------------------
| IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------------- | -------------- | -------------- | ----------------------
8.8.8.8 (US) | https://otx.alienvault.com/indicator/ip/8.8.8.8 | ManualBan: ffffffffffffffffffffffffffffffffff |
=============================================================================================================
Last 10 Unique HTTP(s) Blocks (Outbound);
-------------- | -------------- | -------------- | ----------------------
| IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------------- | -------------- | -------------- | ----------------------
=============================================================================================================
Top 10 HTTP(s) Blocks (Outbound);
-------- | -------------- | -------------- | -------------- | ----------------------
| Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------- | -------------- | -------------- | -------------- | ----------------------
=============================================================================================================
Top 10 Blocks (Inbound);
-------- | -------------- | -------------- | -------------- | ----------------------
| Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------- | -------------- | -------------- | -------------- | ----------------------
986x | 185.254.122.12 (LT) | https://otx.alienvault.com/indicator/ip/185.254.122.12 | BanMalware: firehol_level3.netset* |
779x | 193.32.160.35 (NL) | https://otx.alienvault.com/indicator/ip/193.32.160.35 | BanMalware: alienvault_reputation.ipset |
533x | 88.214.26.55 (SC) | https://otx.alienvault.com/indicator/ip/88.214.26.55 | BanMalware: firehol_level3.netset* |
339x | 5.188.206.34 (BG) | https://otx.alienvault.com/indicator/ip/5.188.206.34 | BanMalware: firehol_level3.netset* |
88x | 81.22.45.184 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.184 | BanMalware: normshield_high_attack.ipset |
70x | 81.22.45.210 (DE) | https://otx.alienvault.com/indicator/ip/81.22.45.210 | BanMalware: normshield_high_attack.ipset |
62x | 185.153.196.142 (MD) | https://otx.alienvault.com/indicator/ip/185.153.196.142 | BanMalware: firehol_level3.netset* |
42x | 92.63.196.17 (RU) | https://otx.alienvault.com/indicator/ip/92.63.196.17 | BanMalware: normshield_high_attack.ipset |
33x | 89.248.162.168 (NL) | https://otx.alienvault.com/indicator/ip/89.248.162.168 | BanMalware: normshield_high_attack.ipset |
21x | 185.176.27.118 (BG) | https://otx.alienvault.com/indicator/ip/185.176.27.118 | BanMalware: normshield_high_attack.ipset |
=============================================================================================================
Top 10 Blocks (Outbound);
-------- | -------------- | -------------- | -------------- | ----------------------
| Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------- | -------------- | -------------- | -------------- | ----------------------
2x | 8.8.8.8 (US) | https://otx.alienvault.com/indicator/ip/8.8.8.8 | ManualBan: ffffffffffffffffffffffffffffffffff |
=============================================================================================================
Top 10 IOT Blocks (Outbound);
-------- | -------------- | -------------- | -------------- | ----------------------
| Hits | | | IP Address | | | AlienVault | | | Ban Reason | | | Associated Domains |
-------- | -------------- | -------------- | -------------- | ----------------------
=============================================================================================================
Top 10 Blocked Devices (Outbound);
-------- | ------------ | ---------------
| Hits | | | Local IP | | | Device Name |
-------- | ------------ | ---------------
2x | 192.168.1.100 | Skynet-PC
=============================================================================================================
[#] 161532 IPs (+0) -- 1841 Ranges Banned (+0) || 2908 Inbound -- 0 Outbound Connections Blocked! [stats] [29s]
@ECHO OFF
plink.exe -load "mpu.cbn.lan" -T "sh /jffs/scripts/firewall stats | sed -r 's/'$(echo -e "\033")'\[[0-9]{1,2}(;([0-9]{1,2})?)?[mK]//g' | strings" > output.txt
"C:\Program Files\Notepad++\notepad++.exe" output.txt
It is something specifically with using plink. If i run it locally through putty its fine. But plink picks up the animated green moving *.
Code:@ECHO OFF plink.exe -load "mpu.cbn.lan" -T "sh /jffs/scripts/firewall stats | sed -r 's/'$(echo -e "\033")'\[[0-9]{1,2}(;([0-9]{1,2})?)?[mK]//g' | strings" > output.txt "C:\Program Files\Notepad++\notepad++.exe" output.txt
Guess I need to mess with the regex to pull that out too.
Messy but it works.Darn, something changed since that post, I tried back then just to learn. Now it is above my pay grade, so someone else will know.
@ECHO OFF
plink.exe -load "mpu.cbn.lan" -T "sh /jffs/scripts/firewall stats | sed -r 's/'$(echo -e "\033")'\[[0-9]{1,2}(;([0-9]{1,2})?)?[mK]//g' | sed '/#/d' | sed 's/\[1;31m//' | sed '/\[1;32m/d' | strings" > output.txt
"C:\Program Files\Notepad++\notepad++.exe" output.txt
Messy but it works.
Why does skynet only add the first ip range and skips the rest? As far as I can tell the file is correctly formatted: https://raw.githubusercontent.com/vic958420/IPBlockList/master/ipaddresses.txt
and how exactly do you remove these "white-spaces" as I tried every option is notepad++ and it could not find any white-spacesThere are trailing white-spaces on almost every line, these are interfering with the regex.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!