Autoblock list via SSH/CLI?

Any questions about the Command Line Interface can be placed here!
Forum rules
We've moved! Head over to Synology Community ( to meet up with our team and other Synology enthusiasts!
I'm New!
I'm New!
Posts: 1
Joined: Tue Jan 28, 2014 2:31 am

Autoblock list via SSH/CLI?

Unread post by seafoodbuffet » Tue Jan 28, 2014 2:35 am

Is there a way to access the auto-block list via SSH or CLI? I encountered a crazy circumstance today where my Diskstation's time was slightly ahead (clock drift, I guess). Before you ask, yes NTP was turned on, not sure what the heck happened.

Anyway, thanks to the clock and two-factor authentication, I failed too many login attempts and it auto-blocked my IP. I SSH'd in from another machine and reset the clock and was able to then access the WebUI to edit the auto-block list. But I was hoping there was a way to edit that from the command-line.

Has anyone done this before?

I'm New!
I'm New!
Posts: 1
Joined: Sat Apr 12, 2014 8:08 am

Re: Autoblock list via SSH/CLI?

Unread post by mv99e » Sat Apr 12, 2014 8:34 am

This is possible.

- ssh to your NAS as root

- the systemwide autoblocklist is situated here /etc/synoautoblock.db

- because it's a sqllite database I don't recommend trying to edit it with vi, so do the following

- sqlite3 synoautoblock.db

- now you're in the database, to know how to query properly make it ease on yourself and type:

.header on

- then type: select * from AutoBlockIP;

- you will then see something like this

sqlite> select * from AutoBlockIP;
IP RecordTime ExpireTime Deny IPStd
-------------- ---------- ---------- ---------- ---------------------------------------
blocked IP 1387487975 0 1 0000:0000:0000:0000:0000:FGGG:C3A8:B415

- then type: delete from AutoBlockIP where IP = 'blocked IP';

- then exit sqlite by typing:

Hope his helps.


Return to “Command Line Interface”