Skip to content

Instantly share code, notes, and snippets.

@mib1185
Last active October 2, 2022 06:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mib1185/0f49640c14023643c5a4f25c7381f5bd to your computer and use it in GitHub Desktop.
Save mib1185/0f49640c14023643c5a4f25c7381f5bd to your computer and use it in GitHub Desktop.
Synology DSM - export blocked ip addresses into a plain text file
outfile="<<full path to output file>>";/bin/sqlite3 /etc/synoautoblock.db 'select IP from AutoBlockIP WHERE 'deny' is 1;' > $outfile ; echo >> $outfile ; chown :users $outfile
@mib1185
Copy link
Author

mib1185 commented Jul 17, 2021

tested with DSM 6.2 and 7.0

usage

  • create new scheduled task of type "User-defined script"
  • recommend to schedule the task at least every 5 minutes (shorter is better)
  • add content of this script into the "Run command" field under "Task settings"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment