Categories
Synology

Download Station: IP Blocklist installation

Here is a solution for enabling IP Filter block list on Download Station:

1. Telnet your NAS (login as root)

2. Edit file /var/packages/DownloadStation/scripts/start-stop-status (you can use vi)
Disable line “rm ${PACKAGE_DIR}/etc/download/settings.json” (add ‘#’ to the beginning of the line)

3. Edit file /var/packages/DownloadStation/etc/download/settings.json (you can use vi)
Set line “blocklist-enabled” to true
Set line “blocklist-url” to “”

4. Create a script file and schedule it:
touch /etc/blockme
chmod +x /etc/blockme
add this file for executing every 24 hours in Synology task scheduler

5. Edit the file and copy this (you can use vi):

———————————————–
#!/bin/sh
# Script for blocking IP's

# Declare temp files
temp_gzip_file=/var/packages/DownloadStation/etc/download/blocklists/level1.gz
temp_down_file=/var/packages/DownloadStation/etc/download/blocklists/level1

# Delete file if exist
if [ -f $temp_gzip_file ]; then
rm $temp_gzip_file
fi

# Set user and password
user=xxxx
pin=xxxx

# Obtain file. Bluetack Level 1
wget -O - "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz&username=$user&pin=$pin" > $temp_gzip_file

# Delete file if exist
if [ -f $temp_down_file ]; then
rm $temp_down_file
fi

# Extract file
gzip -d $temp_gzip_file

# Set time
touch $temp_down_file

———————————————–

6. Set user and pin to the required values for obtaining the block file (or edit wget command for pointing to another link). File format should be like this:

———————————————–
description 1:1.2.4.0-1.2.4.255
description 2:1.2.8.0-1.2.8.255

———————————————–

7. After doing that, when you add your first torrent to download, it’ll create a file /var/packages/DownloadStation/etc/download/blocklists/level1.bin

8. This’s working for torrent client, I don’t know if it works for emule client. If not, you can try to edit /var/packages/DownloadStation/etc/amule/ipfilter.dat file

By Myles Freeman

Just me, nothing to see here..