I didn't hit that button. I just did an unban and it works.
Where is that button?
Sorry! I have to take a break. Got to get food for some others.
Oh! I got you now! I didn't understand(Tired from setting up the two scripts IS and HP).If you click on the URL in the previous post
https://www.snbforums.com/threads/h...t-martineau-version.38748/page-14#post-326413
the button should be in the middle of the page.
NOTE: If you have 'dig' installed from entware-ng, the new script will also check a database to see if it is blocked,...just checked and the IP address doesn't appear to be currently on a known' blacklist database.
Are you going to make any more changes in the near future? It is hard to make changes, since the new script goes into use within an hour of the previous IPSET save.
I apologize. I meant to ask if 4.02 was the new version you are going to post for everyone or are you going to revise it?I'm sorry, I don't understand what you mean by this question/statement.
No. The new versions are probably still being tested.Did you ever find them? I cannot...
I apologize. I meant to ask if 4.02 was the new version you are going to post for everyone or are you going to revise it?
./IPSET_Block.sh status
v4.03 © 2016-2017 Martineau, Dynamic IPSET Blocking.....
Name: Blacklist Name: Whitelist Name: BlacklistTRK
Header: family inet hashsize 8192 maxelem 65536 timeout 259200 Header: family inet hashsize 1024 maxelem 65536 Header: family inet hashsize 2048 maxelem 65536 timeout 604800
Size in memory: 286648 Size in memory: 8500 Size in memory: 143940
Members: Members: Members:
(Total=13724) (Total=0) (Total=7424)
Summary Blacklist: 510+0 Successful blocks! ( 13703 IPs currently banned - 21 added since: May 23 09:00 ), Entries auto-expire after 3 days 00:00:00 hrs
v2.06 © 2016-2017 Martineau, Hacker Port attacks Report.....
Retrieving IPSET BlacklistTRK data for 'eth0' violations, please wait.....
7424 members retrieved from IPSET (BlacklistTRK - Entries auto-expire after 7 days 00:00:00 hrs)
23 May 09:48:07: # Unique Ports attacked via 'eth0': 258 (out of 7410 attempts) tracked via IPSET
Same, not instant, can be 10-15 minutes, or several hours, with the latest being overnight. I have TrendMicro enabled, perhaps I will disable it and see how it goes
So far! It is running perfectly.Well it depends....if v4.02 crashes your router!
Using IPSETs to track the hacker attempts rather than 'cluttering' the Syslog with the tracking messages has a downside, namely the use of memory.
The 'status' command
Code:./IPSET_Block.sh status v4.03 © 2016-2017 Martineau, Dynamic IPSET Blocking..... Name: Blacklist Name: Whitelist Name: BlacklistTRK Header: family inet hashsize 8192 maxelem 65536 timeout 259200 Header: family inet hashsize 1024 maxelem 65536 Header: family inet hashsize 2048 maxelem 65536 timeout 604800 Size in memory: 286648 Size in memory: 8500 Size in memory: 143940 Members: Members: Members: (Total=13724) (Total=0) (Total=7424) Summary Blacklist: 510+0 Successful blocks! ( 13703 IPs currently banned - 21 added since: May 23 09:00 ), Entries auto-expire after 3 days 00:00:00 hrs v2.06 © 2016-2017 Martineau, Hacker Port attacks Report..... Retrieving IPSET BlacklistTRK data for 'eth0' violations, please wait..... 7424 members retrieved from IPSET (BlacklistTRK - Entries auto-expire after 7 days 00:00:00 hrs) 23 May 09:48:07: # Unique Ports attacked via 'eth0': 258 (out of 7410 attempts) tracked via IPSET
shows that additional memory is consumed (even for an empty Whitelist IPSET!) and I want to be sure that the size/trimming of the tracking IPSET is being managed correctly i.e. hopefully I have adequately (see 'restore 'command) allowed the tracking IPSET to be dynamically auto resized without the need for manual intervention or cron jobs etc. i.e. allowing the reporting on demand yet automatically removing obsolete reporting data from the IPSET to free up the memory footprint.
In truth v4.xx has been in use on my router for many weeks and I have not noticed any detrimental effect, although I have restarted IPSET_Block.sh many times for testing etc.
v4.03 has a couple of minor reporting tweaks...i.e. display the timeout value in a more human-friendly way to now show days if necessary (e.g. 604800 secs == 7 days 00:00:00 hrs) etc., but it depends if there is a need/demand to release v4.03+ as a public release.
The address 112.210.232.84 is showing up in the HackerPorts on "Speedguide" as a "red" in Spamhouse on the "Blacklist" button. Should that be banned?
./IPSETBlock.sh status
ipset test Blacklist 112.210.232.84
ipset list BlacklistTRK | grep 112.210.232.84
grep 112.210.232.84 /tmp/syslog.log
grep 112.210.232.84 /mnt/xxx/HackerReport.txt
Here is the output of those commands:Well this is disconcerting...doesn't bode well for v4.xx
Clearly if HackerPorts.sh has reported the unsolicited access attempt, then the I/P address should already be banned.
Presumably the following does show that the Blacklist IPSET is actually being populated?
Code:./IPSETBlock.sh status
So if you issue the following commands:
do any of the commands return results for 112.210.232.84?...if they don't, then I'm not sure why the expected 'ipset add Blacklist' could have failed.Code:ipset test Blacklist 112.210.232.84 ipset list BlacklistTRK | grep 112.210.232.84 grep 112.210.232.84 /tmp/syslog.log grep 112.210.232.84 /mnt/xxx/HackerReport.txt
NOTE: As I posted previously, if entware's 'dig' utility is installed then HackerPorts.sh v2.05 will include the message confirming in 'HackerReport.txt' that 112.210.232.84 is a 'known' address to Spamhaus.org.
(The intention was that IPSET_Block.sh v4.xx would then be able to auto-set 112.210.232.84 etc. as a permanent Blacklist IPSET entry (given the external confirmation by Spamhaus.org) and as such would never auto-expire.)
Here is the output of those commands:
admin@RT-AC3100-0000:/tmp# grep 112.210.232.84 /tmp/HackerReport.txt
8 http://www.speedguide.net/port.php?port=51413 e.g. https://www.speedguide.net/ip/112.210.232.84
1 https://www.speedguide.net/ip/112.210.232.84
https://www.speedguide.net/ip/112.210.232.84
8 http://www.speedguide.net/port.php?port=51413 e.g. https://www.speedguide.net/ip/112.210.232.84
but I don't have "Entware" installed
Here is the output of the ./IPSET_Block.sh starus:So the ipset commands report nothing?
Here is the output of the ./IPSET_Block.sh starus:
admin@RT-AC3100-0000:/jffs/scripts# ./IPSET_Block.sh statur
v4.02 © 2016-2017 Martineau, Dynamic IPSET Blocking.....
Summary Blacklist: 902+0 Successful blocks! ( 7982 IPs currently banned - 233 added since: May 23 12:00 ), Entries auto-expire after 168:00:00 hrs
v2.05 © 2016-2017 Martineau, Hacker Port attacks Report.....
Scanning /tmp/syslog.log for ANY interface (IN=eth0) violations, please wait.....
314 records scanned from Syslog ('/tmp/syslog.log')
23 May 12:52:25: # Unique Ports attacked via ANY interface: 2 (out of 11 attempts) tracked via SYSLOG, May 23 12:50:09 - May 23 12:52:25
Top 3 Ports attacked:
8 http://www.speedguide.net/port.php?port=51413 e.g. https://www.speedguide.net/ip/118.19.102.25
3 http://www.speedguide.net/port.php?port=23 e.g. https://www.speedguide.net/ip/176.8.157.65
Top 3 attackers:
1 https://www.speedguide.net/ip/118.19.102.25
1 https://www.speedguide.net/ip/176.8.157.65
Last 3 most recent attackers:
https://www.speedguide.net/ip/176.8.157.65
https://www.speedguide.net/ip/118.19.102.25
Here is the output of those commands:I am not interested in the './IPSET_Block.sh status' command check your spelling!!!!!!
...but I never asked for this information.
Please answer the question:
Do the two ipset commands return any data.
Here is the output of those commands:
ipset test Blacklist 112.210.232.84
112.210.232.84 is in set Blacklist.
grep 112.210.232.84 /tmp/HackerReport.txt
8 http://www.speedguide.net/port.php?port=51413 e.g. https://www.speedguide.net/ip/112.210.232.84
The address 112.210.232.84 is showing up in the HackerPorts on "Speedguide" as a "red" in Spamhouse on the "Blacklist" button. Should that be banned?
Ok, thanks!So clearly this answers your own query:
I think I'm getting the hang of this Finally! I hope so cause I'm getting feeble in my old age!So clearly this answers your own query:
I use neorouter and every so often one of my far flung neorouter connected machines drops off and I have determined that IPSET_Block is placing their IPs in the block list. I have whitelisted a few, but some of them do not keep the same IPs. My code reading ability is not the best, but I have not been able to find the part of the script which does the magic. I see that lists are loaded, deleted or saved
What criteria will place an IP on the banned list?
Can that criteria be changed?
unban xxx.xxx.xxx.xxx whitelist
Thread starter | Title | Forum | Replies | Date |
---|---|---|---|---|
How I can dynamically manage VPN director rules list by CLI | Asuswrt-Merlin | 0 |
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!