Universal Firewall Setup Instructions - 14 Platforms Here (Check Point Is in /protect)
https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt
Replace YOUR_API_KEY with the API key from your instant-access page.
Updated: Regularly
Creating a whitelist exception is better because:
After whitelisting, please report the false positive to help us improve:
Email: [email protected] Subject: False Positive Report - [IP Address] Include: - IP Address: (e.g., 192.0.2.1) - Why it's legitimate: (e.g., "Microsoft Azure datacenter") - Date discovered: (e.g., 2025-01-15) - Impact: (e.g., "Blocked access to our Office 365 services") We will review it and update the list.
Perfect for: GlobalProtect portal protection, firewall login, and authentication services
ThreatListPro-IPshttps://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txtBlock-ThreatListProThreatListPro-IPsWhitelist-CompanyName-IP192.0.2.1/32 (the IP to whitelist)Block-ThreatListPro ruleWhitelist-ExceptionsWhitelist-CompanyName-IPconfigure set address Whitelist-CompanyXYZ ip-netmask 192.0.2.1/32 description "Whitelisted - CompanyXYZ" set rulebase security rules Whitelist-Exceptions source Whitelist-CompanyXYZ action allow move rulebase security rules Whitelist-Exceptions before Block-ThreatListPro commit
# Check address object show object address | match Whitelist # Test traffic from whitelisted IP (should be allowed) test security-policy-match source 192.0.2.1 destination 10.0.0.1 protocol 6 destination-port 443
SSH to your firewall and run:
show system external-list # Force immediate update: request system external-list refresh name ThreatListPro-IPs
Perfect for: SSL-VPN, Admin Portal, and firewall management access protection
SSH to your FortiGate and run these commands:
config system external-resource
edit "ThreatListPro"
set type address
set resource "https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt"
set refresh-rate 60
set status enable
next
end
config firewall address
edit "ThreatListPro-Blocklist"
set type external
set external "ThreatListPro"
next
end
config firewall policy
edit 0
set name "Block-ThreatListPro"
set srcintf "wan1"
set dstintf "any"
set srcaddr "ThreatListPro-Blocklist"
set dstaddr "all"
set action deny
set schedule "always"
set service "ALL"
set logtraffic all
next
end
Create a whitelist address and policy that executes before the block rule:
config firewall address
edit "Whitelist-CompanyXYZ"
set subnet 192.0.2.1 255.255.255.255
set comment "Whitelisted 2025-01-15 - CompanyXYZ VPN endpoint"
next
end
config firewall policy
edit 0
set name "Whitelist-Exceptions"
set srcintf "wan1"
set dstintf "any"
set srcaddr "Whitelist-CompanyXYZ"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
set comments "Allow whitelisted IPs - overrides ThreatListPro block"
next
end
# IMPORTANT: Move whitelist policy BEFORE block policy
config firewall policy
move 1 before 2
end
Whitelist-CompanyXYZ192.0.2.1/32# Check policy order (whitelist should be policy ID 1 or before block rule) show firewall policy # Check address object show firewall address Whitelist-CompanyXYZ # View logs for whitelisted traffic execute log filter field srcip 192.0.2.1 execute log display
ThreatListPro_Feedhttps://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt# Check external resource status diagnose test application dnsproxy 7 # Force update execute update-now external-resource ThreatListPro
Most popular open-source option
ThreatListProhttps://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txtpfBlockerNG has a built-in whitelist feature that overrides all blocklists:
ThreatListPro_Exceptions192.0.2.1/32 # CompanyXYZ VPN - whitelisted 2025-01-15 198.51.100.42/32 # Partner AWS instance - whitelisted 2025-01-15
Whitelist_ThreatListPro192.0.2.1 | Description: "CompanyXYZ VPN"Whitelist_ThreatListProCheck whitelist is working:
Check Firewall → pfBlockerNG → Reports to see blocked IPs and statistics.
Perfect for: AnyConnect VPN and firewall management protection
SSH to your Cisco ASA and configure:
configure terminal ! Create object-group for dynamic list object-group network ThreatListPro-IPs description ThreatListPro Malicious IP Blocklist ! Import list from URL (requires ASA 9.10+) import webtype txt https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt poll-period 3600 exit
! Create ACL to block the IPs access-list OUTSIDE-IN extended deny ip object-group ThreatListPro-IPs any log access-list OUTSIDE-IN extended permit ip any any ! Apply to outside interface access-group OUTSIDE-IN in interface outside write memory
configure terminal ! Create whitelist object group object-group network Whitelist-ThreatListPro-Exceptions description Whitelisted IPs that override ThreatListPro blocks network-object host 192.0.2.1 network-object host 198.51.100.42 ! Add more IPs as needed ! Add whitelist rule BEFORE deny rule in ACL access-list OUTSIDE-IN line 1 extended permit ip object-group Whitelist-ThreatListPro-Exceptions any log write memory
line 1 parameter ensures the permit rule is evaluated before the deny rule.
configure terminal ! Create host objects for each whitelisted IP object network Whitelist-CompanyXYZ-VPN host 192.0.2.1 description Whitelisted 2025-01-15 - CompanyXYZ VPN endpoint object network Whitelist-Partner-AWS host 198.51.100.42 description Whitelisted 2025-01-15 - Partner AWS instance ! Add to ACL before deny rule access-list OUTSIDE-IN line 1 extended permit ip object Whitelist-CompanyXYZ-VPN any log access-list OUTSIDE-IN line 2 extended permit ip object Whitelist-Partner-AWS any log write memory
! Show ACL to verify whitelist rules are first show access-list OUTSIDE-IN ! Expected output: ! access-list OUTSIDE-IN line 1 extended permit ip host 192.0.2.1 any (hitcnt=X) ! access-list OUTSIDE-IN line 2 extended deny ip object-group ThreatListPro-IPs any (hitcnt=Y) ! Test connection from whitelisted IP (should be permitted) packet-tracer input outside tcp 192.0.2.1 12345 10.0.0.1 443
line 1 to ensure whitelist rules evaluate before the ThreatListPro deny rule.
# On your management workstation
curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt -o blocklist.txt
# Generate ASA commands
cat blocklist.txt | awk '{print "access-list OUTSIDE-IN extended deny ip host " $1 " any log"}' > asa-commands.txt
# Copy commands to ASA configure terminal ! Paste the contents of asa-commands.txt here access-group OUTSIDE-IN in interface outside write memory
show access-list OUTSIDE-IN | include deny show conn | include deny
Perfect for: VPN portal and management interface protection
SonicOS 7 downloads the list itself and keeps it current.
ThreatListPro (SonicOS adds the DEAG_ prefix)https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txtOlder firmware has no Dynamic Group, so import the list and repeat the import to refresh it.
# On your workstation curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt -o blocklist.csv
blocklist.csvThreatListPro-GroupWhitelist-CompanyXYZ192.0.2.1Whitelist-ExceptionsYou can manually edit the ThreatListPro-Group and remove specific IPs:
ThreatListPro-GroupSchedule a script (for example every 6 hours) to download and re-import the list automatically using SonicWall API.
Open-source alternative to pfSense
ThreatListProhttps://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txtWhitelist_ThreatListPro192.0.2.1 # CompanyXYZ VPN - whitelisted 2025-01-15 198.51.100.42 # Partner AWS - whitelisted 2025-01-15
# SSH to OPNsense (if you have shell access) # Create whitelist alias via CLI configctl firewall alias set Whitelist_ThreatListPro type=host content="192.0.2.1,198.51.100.42" # Reload aliases configctl firewall alias reload
# SSH to OPNsense pfctl -t Whitelist_ThreatListPro -T show # Expected output: Your whitelisted IPs # 192.0.2.1 # 198.51.100.42 # Check that whitelist rule is before block rule pfctl -sr | grep -E "ThreatListPro|Whitelist" # Test that whitelisted IP can connect pfctl -vvsr | grep 192.0.2.1
#. This helps you document why each IP was whitelisted.
# SSH to OPNsense pfctl -t ThreatListPro -T show | wc -l # Should show ~15000 IPs
Perfect for: VPN and management access protection
ThreatListPro# On your workstation curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt -o blocklist.txt
ThreatListPro-GroupWhitelist-CompanyXYZ192.0.2.1Whitelist-ExceptionsYou can also remove the false positive IP directly from ThreatListPro-Group:
ThreatListPro-GroupPolicy #1: Whitelist-Exceptions (Allow) Policy #2: ThreatListPro-Group (Deny) Policy #3: [other policies...]
Perfect for: logging and blocking known attacker addresses with a third-party threat feed (SFOS 21.0 or later, Xstream Protection license)
blocklist.txt is written as CIDR, so Sophos gets its own URL. It lists single IPs, plus ranges of /22 or smaller expanded into their host addresses. Larger ranges are left out; they hold most of the 5.4M+ addresses, so on Sophos the feed blocks only a small share of them (Step 3 covers the larger ranges). On SFOS 21.0 or later, Sophos documents that a feed's IPv4 indicators also match traffic to the firewall's own services under Administration → Device access, including the VPN portal and VPN. Start in Monitor mode. Full guide: Sophos Firewall VPN brute force.
https://api.threatlistpro.com/v1/YOUR_API_KEY/sophos.txt (it contains your API key; treat it as a secret)https://api.threatlistpro.com/v1/sample/sophos.txt (no signup)ThreatListProSophos documents traffic to the firewall's own services under Administration → Device access:
blocklist.txt, which the Sophos URL leaves out. List them with grep -v '^#' blocklist.txt | awk -F/ '$2 < 22'These host objects do not update from a URL, so update them yourself when the list changes.
Exclusions apply to all Active threat response feeds. Also remove the address from the host objects in the Step 3 rule, if it is in one.
Perfect for: VPN and router management protection
Connect via WinBox or SSH, then:
/system script add name=UpdateThreatList source={
:log info "Downloading ThreatListPro blocklist"
/tool fetch url="https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt" \
dst-path=threatlist.txt mode=https
:log info "Clearing old address list"
/ip firewall address-list remove [find list=ThreatListPro]
:log info "Importing new IPs"
:local content [/file get threatlist.txt contents]
:foreach line in=$content do={
:if ([:len $line] > 0) do={
/ip firewall address-list add list=ThreatListPro address=$line
}
}
:log info "ThreatListPro list updated successfully"
}
/ip firewall filter add chain=input \
src-address-list=ThreatListPro \
action=drop \
comment="Block ThreatListPro IPs" \
log=yes log-prefix="ThreatListPro-Block"
/ip firewall filter add chain=forward \
src-address-list=ThreatListPro \
action=drop \
comment="Block ThreatListPro IPs Forward" \
log=yes log-prefix="ThreatListPro-Block"
/system scheduler add name=UpdateThreatListDaily \
on-event=UpdateThreatList \
start-time=03:00:00 \
interval=1d \
comment="Update ThreatListPro blocklist daily"
/system script run UpdateThreatList
/ip firewall address-list add list=Whitelist-ThreatListPro \
address=192.0.2.1 \
comment="Whitelisted 2025-01-15 - CompanyXYZ VPN"
/ip firewall address-list add list=Whitelist-ThreatListPro \
address=198.51.100.42 \
comment="Whitelisted 2025-01-15 - Partner AWS"
# Add whitelist rule BEFORE the drop rules
/ip firewall filter add chain=input \
src-address-list=Whitelist-ThreatListPro \
action=accept \
comment="Allow whitelisted IPs - overrides ThreatListPro" \
place-before=0
/ip firewall filter add chain=forward \
src-address-list=Whitelist-ThreatListPro \
action=accept \
comment="Allow whitelisted IPs - overrides ThreatListPro" \
place-before=1
place-before=0 parameter ensures the whitelist rule is evaluated before the ThreatListPro drop rules.
You can remove specific IPs from the ThreatListPro address list:
# Find the address entry /ip firewall address-list print where address=192.0.2.1 # Remove it (replace # with the actual number from print command) /ip firewall address-list remove # # Note: This IP will be re-added on next update, so use Method 1 or 2 instead
# Check whitelist /ip firewall address-list print where list=Whitelist-ThreatListPro # Check filter rules order /ip firewall filter print # Expected output: # 0: Allow Whitelist-ThreatListPro (accept) # 1: Block ThreatListPro input (drop) # 2: Block ThreatListPro forward (drop) # View logs /log print where message~"ThreatListPro"
place-before to ensure whitelist accept rules are evaluated before the ThreatListPro drop rules.
# Check address list /ip firewall address-list print count-only where list=ThreatListPro # Check firewall rule /ip firewall filter print where comment~"ThreatListPro" # View logs /log print where message~"ThreatListPro"
Perfect for: Network edge protection and VPN access control
ssh [email protected]
configure # Create network group for blocklist set firewall group network-group ThreatListPro description "ThreatListPro Blocklist" commit save exit
Create file /config/scripts/update-threatlist.sh:
#!/bin/bash
# ThreatListPro Update Script
BLOCKLIST_URL="https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt"
TEMP_FILE="/tmp/threatlist.txt"
GROUP_NAME="ThreatListPro"
# Download latest list
curl -s "$BLOCKLIST_URL" -o "$TEMP_FILE"
# Remove old entries
vtysh -c "configure terminal" -c "no firewall group network-group $GROUP_NAME"
# Add new entries
vtysh -c "configure terminal" -c "firewall group network-group $GROUP_NAME description 'ThreatListPro Blocklist'"
while IFS= read -r ip; do
if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
vtysh -c "configure terminal" -c "firewall group network-group $GROUP_NAME network $ip"
fi
done < "$TEMP_FILE"
# Cleanup
rm -f "$TEMP_FILE"
echo "ThreatListPro list updated: $(date)" >> /var/log/threatlist.log
chmod +x /config/scripts/update-threatlist.sh
configure set firewall name WAN_IN rule 1 action drop set firewall name WAN_IN rule 1 description "Block ThreatListPro IPs" set firewall name WAN_IN rule 1 log enable set firewall name WAN_IN rule 1 protocol all set firewall name WAN_IN rule 1 source group network-group ThreatListPro commit save
configure set system task-scheduler task update-threatlist executable path /config/scripts/update-threatlist.sh set system task-scheduler task update-threatlist interval 1d set system task-scheduler task update-threatlist start-time 03:00 commit save exit
/config/scripts/update-threatlist.sh
configure # Create whitelist network group set firewall group network-group Whitelist-ThreatListPro description "Whitelisted IPs - overrides ThreatListPro" set firewall group network-group Whitelist-ThreatListPro network 192.0.2.1/32 set firewall group network-group Whitelist-ThreatListPro network 198.51.100.42/32 # Create whitelist rule BEFORE block rule (rule 0) set firewall name WAN_IN rule 0 action accept set firewall name WAN_IN rule 0 description "Allow whitelisted IPs - overrides ThreatListPro" set firewall name WAN_IN rule 0 log enable set firewall name WAN_IN rule 0 protocol all set firewall name WAN_IN rule 0 source group network-group Whitelist-ThreatListPro commit save
Create /config/scripts/whitelist-threatlist.sh:
#!/bin/bash # Add whitelisted IPs vtysh -c "configure terminal" -c "firewall group network-group Whitelist-ThreatListPro description 'Whitelisted IPs'" vtysh -c "configure terminal" -c "firewall group network-group Whitelist-ThreatListPro network 192.0.2.1/32" vtysh -c "configure terminal" -c "firewall group network-group Whitelist-ThreatListPro network 198.51.100.42/32" echo "Whitelist updated: $(date)" >> /var/log/threatlist.log
Make executable and run:
chmod +x /config/scripts/whitelist-threatlist.sh /config/scripts/whitelist-threatlist.sh
# Show whitelist network group
show firewall group network-group Whitelist-ThreatListPro
# Show firewall rules (whitelist should be rule 0, block should be rule 1)
show firewall name WAN_IN
# Expected output:
# rule 0 {
# action accept
# description "Allow whitelisted IPs"
# source { group { network-group Whitelist-ThreatListPro } }
# }
# rule 1 {
# action drop
# description "Block ThreatListPro IPs"
# source { group { network-group ThreatListPro } }
# }
# View logs
tail -f /var/log/messages | grep ThreatListPro
# Check network group show firewall group network-group ThreatListPro # Check firewall rules show firewall name WAN_IN # View logs tail -f /var/log/messages | grep ThreatListPro
Perfect for: Home labs, small business networks, and UniFi ecosystem users
In UniFi Network Controller:
ssh [email protected]
Replace with your UDM IP address.
mkdir -p /data/scripts
nano /data/scripts/threatlistpro.sh
Paste the following script (replace YOUR_API_KEY with your actual API key):
#!/bin/bash
#
# ThreatListPro - UniFi Dream Machine Setup Script
#
BLOCKLIST_URL="https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt"
IPSET_NAME="threatlistpro"
TEMP_FILE="/tmp/threatlistpro_ips.txt"
LOG_FILE="/var/log/threatlistpro.log"
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') [ThreatListPro] $1" | tee -a "$LOG_FILE"
}
log "Starting ThreatListPro update..."
if [[ "$BLOCKLIST_URL" == *"YOUR_API_KEY"* ]]; then
log "ERROR: Replace YOUR_API_KEY with your actual key"
exit 1
fi
curl -s -o "$TEMP_FILE" "$BLOCKLIST_URL"
if ! ipset list "$IPSET_NAME" &>/dev/null; then
ipset create "$IPSET_NAME" hash:ip hashsize 65536 maxelem 3000000
fi
TEMP_IPSET="${IPSET_NAME}_temp"
ipset create "$TEMP_IPSET" hash:ip hashsize 65536 maxelem 3000000 2>/dev/null || true
ipset flush "$TEMP_IPSET"
ADDED=0
while IFS= read -r ip; do
[[ "$ip" =~ ^#.*$ ]] && continue
[[ -z "$ip" ]] && continue
if [[ "$ip" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
ipset add "$TEMP_IPSET" "$ip" 2>/dev/null && ((ADDED++))
fi
done < "$TEMP_FILE"
ipset swap "$TEMP_IPSET" "$IPSET_NAME"
ipset destroy "$TEMP_IPSET"
if ! iptables -C INPUT -m set --match-set "$IPSET_NAME" src -j DROP 2>/dev/null; then
iptables -I INPUT 1 -m set --match-set "$IPSET_NAME" src -j DROP
fi
if ! iptables -C FORWARD -m set --match-set "$IPSET_NAME" src -j DROP 2>/dev/null; then
iptables -I FORWARD 1 -m set --match-set "$IPSET_NAME" src -j DROP
fi
rm -f "$TEMP_FILE"
log "SUCCESS! $ADDED IPs blocked"
chmod +x /data/scripts/threatlistpro.sh /data/scripts/threatlistpro.sh
crontab -e
Add:
0 3 * * * /data/scripts/threatlistpro.sh
mkdir -p /data/on_boot.d cat > /data/on_boot.d/10-threatlistpro.sh << 'EOF' #!/bin/bash /data/scripts/threatlistpro.sh EOF chmod +x /data/on_boot.d/10-threatlistpro.sh
ipset create threatlistpro_whitelist hash:ip ipset add threatlistpro_whitelist 192.0.2.1 iptables -I INPUT 1 -m set --match-set threatlistpro_whitelist src -j ACCEPT iptables -I FORWARD 1 -m set --match-set threatlistpro_whitelist src -j ACCEPT
ipset list threatlistpro | head -20 iptables -L INPUT -n | head -10 tail -f /var/log/threatlistpro.log
Perfect for: Enterprise firewall and VPN protection
configure
# Create security feed
set security threat-intelligence url https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt \
category ThreatListPro \
interval 3600
# Create address entry from feed
set security address-book global address-set ThreatListPro \
address-set-type feed-name ThreatListPro
commit
# Deny traffic from ThreatListPro IPs
set security policies from-zone untrust to-zone trust policy block-threats \
match source-address ThreatListPro \
match destination-address any \
match application any \
then deny \
then log session-close
commit and-quit
configure
# Create individual addresses for whitelisted IPs
set security address-book global address Whitelist-CompanyXYZ-VPN 192.0.2.1/32
set security address-book global address Whitelist-Partner-AWS 198.51.100.42/32
# Create address set grouping all whitelisted IPs
set security address-book global address-set Whitelist-Exceptions address Whitelist-CompanyXYZ-VPN
set security address-book global address-set Whitelist-Exceptions address Whitelist-Partner-AWS
# Create allow policy for whitelisted IPs (BEFORE deny policy)
set security policies from-zone untrust to-zone trust policy allow-whitelist \
match source-address Whitelist-Exceptions \
match destination-address any \
match application any \
then permit \
then log session-init session-close
# Move whitelist policy before block policy
insert security policies from-zone untrust to-zone trust policy allow-whitelist before policy block-threats
commit and-quit
configure
# Create whitelisted addresses with descriptions
set security address-book global address Whitelist-CompanyXYZ 192.0.2.1/32 description "Whitelisted 2025-01-15 - CompanyXYZ VPN"
set security address-book global address Whitelist-PartnerAWS 198.51.100.42/32 description "Whitelisted 2025-01-15 - Partner AWS"
# Create address set
set security address-book global address-set Whitelist-All address Whitelist-CompanyXYZ
set security address-book global address-set Whitelist-All address Whitelist-PartnerAWS
# Create security policy
set security policies from-zone untrust to-zone trust policy whitelist-allow \
match source-address Whitelist-All \
match destination-address any \
match application any \
then permit \
then log session-close
# Ensure this policy is evaluated first
insert security policies from-zone untrust to-zone trust policy whitelist-allow before policy 1
commit and-quit
# Show address book entries show security address-book global | match Whitelist # Expected output: # Whitelist-CompanyXYZ 192.0.2.1/32 # Whitelist-PartnerAWS 198.51.100.42/32 # Show address set show security address-book global address-set Whitelist-Exceptions # Show security policies show security policies # Expected: whitelist-allow policy appears before block-threats policy # Monitor traffic from whitelisted IPs show security flow session source-prefix 192.0.2.1/32 # Check logs show log messages | match Whitelist
insert...before command to ensure the whitelist permit policy is evaluated before the ThreatListPro deny policy.
# On management station
curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt -o blocklist.txt
# Convert to Junos format
awk '{print "set security address-book global address IP-"NR" " $1 "/32"}' blocklist.txt > junos-commands.txt
echo "set security address-book global address-set ThreatListPro" >> junos-commands.txt
awk '{print "set security address-book global address-set ThreatListPro address IP-"NR}' blocklist.txt >> junos-commands.txt
configure load set terminal # Paste contents of junos-commands.txt here commit and-quit
configure
set security policies from-zone untrust to-zone trust policy block-threatlist \
match source-address ThreatListPro \
match destination-address any \
match application any \
then deny \
then log session-init session-close
# Move to top of policy list
insert security policies from-zone untrust to-zone trust policy block-threatlist before policy 1
commit and-quit
# Show address entries show security address-book global # Show security policy show security policies # Monitor blocked traffic show security flow session | match ThreatListPro
Perfect for: Linux servers, VPS, and custom firewall solutions
# Debian/Ubuntu sudo apt-get update sudo apt-get install ipset curl # CentOS/RHEL sudo yum install ipset curl # Arch Linux sudo pacman -S ipset curl
Create /usr/local/bin/update-threatlist.sh:
#!/bin/bash
# ThreatListPro Update Script for Linux
BLOCKLIST_URL="https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt"
IPSET_NAME="threatlistpro"
TEMP_FILE="/tmp/threatlist.txt"
# Create ipset if doesn't exist
ipset list $IPSET_NAME &>/dev/null || ipset create $IPSET_NAME hash:ip maxelem 20000
# Download latest list
curl -s "$BLOCKLIST_URL" -o "$TEMP_FILE"
if [ $? -eq 0 ]; then
# Create temporary ipset
ipset create ${IPSET_NAME}_temp hash:ip maxelem 20000
# Load IPs into temporary set
while IFS= read -r ip; do
if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
ipset add ${IPSET_NAME}_temp $ip -exist
fi
done < "$TEMP_FILE"
# Swap sets atomically
ipset swap ${IPSET_NAME}_temp $IPSET_NAME
ipset destroy ${IPSET_NAME}_temp
echo "$(date): ThreatListPro list updated successfully" >> /var/log/threatlist.log
else
echo "$(date): Failed to download ThreatListPro list" >> /var/log/threatlist.log
fi
rm -f "$TEMP_FILE"
sudo chmod +x /usr/local/bin/update-threatlist.sh
# Block incoming traffic from ThreatListPro IPs sudo iptables -I INPUT -m set --match-set threatlistpro src -j DROP sudo iptables -I FORWARD -m set --match-set threatlistpro src -j DROP # Save rules (Debian/Ubuntu) sudo iptables-save > /etc/iptables/rules.v4 # Save rules (CentOS/RHEL) sudo service iptables save
# Add to crontab sudo crontab -e # Add this line (update daily at 3 AM) 0 3 * * * /usr/local/bin/update-threatlist.sh
sudo /usr/local/bin/update-threatlist.sh
# Create whitelist ipset sudo ipset create whitelist-threatlistpro hash:ip # Add whitelisted IPs sudo ipset add whitelist-threatlistpro 192.0.2.1 -exist sudo ipset add whitelist-threatlistpro 198.51.100.42 -exist # Create iptables rule to accept whitelisted IPs BEFORE drop rules sudo iptables -I INPUT 1 -m set --match-set whitelist-threatlistpro src -j ACCEPT sudo iptables -I FORWARD 1 -m set --match-set whitelist-threatlistpro src -j ACCEPT # Save rules sudo iptables-save > /etc/iptables/rules.v4 # Debian/Ubuntu sudo service iptables save # CentOS/RHEL
Create /usr/local/bin/whitelist-threatlist.sh:
#!/bin/bash # Whitelist IPs for ThreatListPro WHITELIST_SET="whitelist-threatlistpro" # Create whitelist set if it doesn't exist ipset list $WHITELIST_SET &>/dev/null || ipset create $WHITELIST_SET hash:ip # Add whitelisted IPs with comments ipset add $WHITELIST_SET 192.0.2.1 -exist comment "CompanyXYZ VPN - whitelisted 2025-01-15" ipset add $WHITELIST_SET 198.51.100.42 -exist comment "Partner AWS - whitelisted 2025-01-15" echo "$(date): Whitelist updated" >> /var/log/threatlist.log
Make executable and run:
sudo chmod +x /usr/local/bin/whitelist-threatlist.sh sudo /usr/local/bin/whitelist-threatlist.sh
# Remove specific IP from blocklist sudo ipset del threatlistpro 192.0.2.1 # Note: This IP will be re-added on next update # Use Method 1 or 2 for permanent whitelisting
# Check whitelist ipset sudo ipset list whitelist-threatlistpro # Check iptables rules order sudo iptables -L INPUT -v -n --line-numbers | head -20 # Expected output: # 1 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 match-set whitelist-threatlistpro src # 2 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 match-set threatlistpro src # Test connection from whitelisted IP # (Connection should be allowed) # View logs sudo tail -f /var/log/syslog | grep "DROP"
-I INPUT 1 to insert the whitelist ACCEPT rule at the very top, before the ThreatListPro DROP rule.
# Install nftables
sudo apt-get install nftables
# Create set
sudo nft add table inet filter
sudo nft add set inet filter threatlistpro { type ipv4_addr\; flags interval\; }
# Add rule
sudo nft add rule inet filter input ip saddr @threatlistpro drop
sudo nft add rule inet filter forward ip saddr @threatlistpro drop
# Load IPs
curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt | \
while read ip; do
sudo nft add element inet filter threatlistpro { $ip }
done
# Save configuration
sudo nft list ruleset > /etc/nftables.conf
# Check ipset sudo ipset list threatlistpro | head -20 # Count IPs in set sudo ipset list threatlistpro | grep -c "^[0-9]" # Check iptables rules sudo iptables -L INPUT -v -n | grep threatlistpro # View logs sudo tail -f /var/log/syslog | grep "DROP"
Perfect for: Windows Server RDP protection and VPN access
Create C:\Scripts\Update-ThreatList.ps1:
# ThreatListPro Update Script for Windows Firewall
# Save as: C:\Scripts\Update-ThreatList.ps1
$BlocklistURL = "https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt"
$RuleName = "Block ThreatListPro IPs"
$TempFile = "$env:TEMP\threatlist.txt"
# Download blocklist
try {
Invoke-WebRequest -Uri $BlocklistURL -OutFile $TempFile -UseBasicParsing
Write-Host "Downloaded ThreatListPro blocklist successfully"
} catch {
Write-Error "Failed to download blocklist: $_"
exit 1
}
# Read IPs
$IPs = Get-Content $TempFile | Where-Object { $_ -match '^\d+\.\d+\.\d+\.\d+ }
# Remove old rule if exists
$ExistingRule = Get-NetFirewallRule -DisplayName $RuleName -ErrorAction SilentlyContinue
if ($ExistingRule) {
Remove-NetFirewallRule -DisplayName $RuleName
Write-Host "Removed old firewall rule"
}
# Create new blocking rule
# Note: Windows Firewall has a limit of ~1000 IPs per rule
# We'll create multiple rules in batches of 1000
$BatchSize = 1000
$BatchNumber = 1
for ($i = 0; $i -lt $IPs.Count; $i += $BatchSize) {
$Batch = $IPs[$i..([Math]::Min($i + $BatchSize - 1, $IPs.Count - 1))]
$RuleNameBatch = "$RuleName - Batch $BatchNumber"
New-NetFirewallRule -DisplayName $RuleNameBatch `
-Direction Inbound `
-Action Block `
-RemoteAddress $Batch `
-Protocol Any `
-Profile Any `
-Enabled True `
-Description "ThreatListPro malicious IPs - Batch $BatchNumber"
Write-Host "Created rule batch $BatchNumber with $($Batch.Count) IPs"
$BatchNumber++
}
# Cleanup
Remove-Item $TempFile -Force
Write-Host "ThreatListPro blocklist updated successfully"
Add-Content -Path "C:\Scripts\threatlist.log" -Value "$(Get-Date): Updated $($IPs.Count) IPs"
# Open PowerShell as Administrator Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser # Create scripts directory New-Item -ItemType Directory -Path "C:\Scripts" -Force # Run the script C:\Scripts\Update-ThreatList.ps1
# Create scheduled task via PowerShell
$Action = New-ScheduledTaskAction -Execute "PowerShell.exe" `
-Argument "-NoProfile -ExecutionPolicy Bypass -File C:\Scripts\Update-ThreatList.ps1"
$Trigger = New-ScheduledTaskTrigger -Daily -At 3:00AM
$Principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest
$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
Register-ScheduledTask -TaskName "Update ThreatListPro Blocklist" `
-Action $Action `
-Trigger $Trigger `
-Principal $Principal `
-Settings $Settings `
-Description "Updates ThreatListPro IP blocklist daily"
Create C:\Scripts\Whitelist-ThreatList.ps1:
# ThreatListPro Whitelist Script for Windows Firewall
$WhitelistRuleName = "Allow ThreatListPro Whitelist"
# Define whitelisted IPs
$WhitelistedIPs = @(
"192.0.2.1", # CompanyXYZ VPN - whitelisted 2025-01-15
"198.51.100.42" # Partner AWS - whitelisted 2025-01-15
)
# Remove old whitelist rule if exists
$ExistingRule = Get-NetFirewallRule -DisplayName $WhitelistRuleName -ErrorAction SilentlyContinue
if ($ExistingRule) {
Remove-NetFirewallRule -DisplayName $WhitelistRuleName
Write-Host "Removed old whitelist rule"
}
# Create whitelist allow rule (must be processed before block rules)
New-NetFirewallRule -DisplayName $WhitelistRuleName `
-Direction Inbound `
-Action Allow `
-RemoteAddress $WhitelistedIPs `
-Protocol Any `
-Profile Any `
-Enabled True `
-Description "Whitelisted IPs that override ThreatListPro blocks"
Write-Host "Whitelist rule created with $($WhitelistedIPs.Count) IPs"
# Log the change
Add-Content -Path "C:\Scripts\threatlist.log" -Value "$(Get-Date): Whitelist updated"
Run the script:
# Open PowerShell as Administrator C:\Scripts\Whitelist-ThreatList.ps1
192.0.2.1Allow ThreatListPro Whitelist → FinishYou can edit individual ThreatListPro block rules to exclude specific IPs:
# List all ThreatListPro rules Get-NetFirewallRule -DisplayName "Block ThreatListPro*" | Format-Table # Get address filter for a specific rule Get-NetFirewallRule -DisplayName "Block ThreatListPro IPs - Batch 1" | Get-NetFirewallAddressFilter # Remove IP from rule (not recommended - use whitelist instead) # This is complex and must be done for each batch rule
# Check whitelist rule exists
Get-NetFirewallRule -DisplayName "Allow ThreatListPro Whitelist" | Format-Table
# Check rule details
Get-NetFirewallRule -DisplayName "Allow ThreatListPro Whitelist" | Get-NetFirewallAddressFilter
# Expected output: RemoteAddress should show your whitelisted IPs
# View all ThreatListPro related rules
Get-NetFirewallRule | Where-Object { $_.DisplayName -like "*ThreatListPro*" } | Format-Table DisplayName, Action
# Expected output:
# Allow ThreatListPro Whitelist Allow
# Block ThreatListPro IPs - Batch 1 Block
# Block ThreatListPro IPs - Batch 2 Block
# Test connection from whitelisted IP
# Connection should be allowed
# View Windows Firewall logs (if enabled)
Get-WinEvent -LogName "Microsoft-Windows-Windows Firewall With Advanced Security/Firewall" -MaxEvents 20
$WhitelistedIPs array in the PowerShell script and run it again. The script will recreate the rule with all IPs.
Block ThreatListPro IPs → Finish# Check firewall rules Get-NetFirewallRule -DisplayName "Block ThreatListPro*" | Format-Table # Count blocked IPs (Get-NetFirewallRule -DisplayName "Block ThreatListPro*" | Get-NetFirewallAddressFilter).RemoteAddress.Count # View logs Get-WinEvent -LogName "Microsoft-Windows-Windows Firewall With Advanced Security/Firewall" -MaxEvents 20
For any firewall not listed above
If your firewall isn't listed, follow this universal approach that works with most firewall systems:
https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt
Format: Plain text, one IPv4 address per line
Example content:
192.0.2.1 192.0.2.15 198.51.100.42 203.0.113.7
Your firewall likely supports ONE of these methods:
Look for features named:
If found: Simply paste your ThreatListPro URL and set update frequency to daily/hourly.
Download the list and import manually:
# Download list curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt -o blocklist.txt # Or on Windows: Invoke-WebRequest -Uri "https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt" -OutFile blocklist.txt
Then import via your firewall's GUI:
For firewalls without import:
Regardless of method, create a rule with these settings:
Regardless of your firewall platform, follow these universal steps:
Ensure your rules are in this order (top to bottom):
1. Allow-Whitelist-Exceptions (Action: Allow) 2. Block-ThreatListPro (Action: Deny/Drop) 3. [Other rules...]
Some firewalls allow editing the address group directly:
# Create update script cat > /usr/local/bin/update-blocklist.sh << 'EOF' #!/bin/bash curl https://api.threatlistpro.com/v1/YOUR_API_KEY/blocklist.txt -o /tmp/blocklist.txt # Add your firewall-specific import commands here EOF chmod +x /usr/local/bin/update-blocklist.sh # Schedule daily crontab -e # Add: 0 3 * * * /usr/local/bin/update-blocklist.sh
| Generic Term | Your Firewall Might Call It... |
|---|---|
| IP Blocklist | Address Object, Network Object, Host Group, IP Group |
| Block Rule | Security Policy, Access Rule, Filter Rule, ACL |
| External List | Threat Feed, Dynamic List, URL Category, Feed Source |
| Deny Action | Drop, Reject, Block, Discard |
| Whitelist | Exception List, Allow List, Permit List, Exclusions |
Email us with:
We'll send you custom instructions.
Any firewall that can load an IPv4 list from a URL, such as an External Dynamic List (EDL) or threat feed. This page covers Palo Alto, FortiGate, pfSense, OPNsense, SonicWall, Cisco ASA, WatchGuard, Sophos, MikroTik, Ubiquiti EdgeRouter, UniFi, Juniper SRX, Linux and Windows, and the setup guides cover 15 firewall platforms in more detail.
The ThreatListPro blocklist is checked for new attackers every 6 hours. Your firewall fetches the current version on the refresh interval you set; hourly is plenty, since the list is checked for new attackers every 6 hours.
Not on firewalls with a URL feed object, such as Palo Alto, FortiGate, Check Point, Sophos, SonicWall, pfSense and OPNsense: the firewall fetches the list over HTTPS. Devices without one, such as MikroTik, UniFi and Linux hosts, load it with a short script that runs on a schedule, and the guides include it.
Can't find your firewall? Need specific assistance?
Email: [email protected]
Support: by email
We're here to help you get protected quickly!