WaterByWind / edgeos-bl-mgmt

Automated updating of EdgeOS firewall network-group to be used as source address blacklist
MIT License
196 stars 40 forks source link

Error when running update script #14

Closed nolefan closed 5 years ago

nolefan commented 5 years ago

When running the update script, I get all the way past the download of the files and IPV4 ipset, then get this message. I am using an Edge Router 4.

Applying IPset (IPv6) ipset v6.23: Error in line 2: Syntax error: cannot parse 1000::: resolving to IPv4 address failed FATAL: inet6 ipset restore failed: error 1

alternativesurfer commented 5 years ago

I get a similar problem but with ipv4:

Starting at 20:45:08 UTC Fri 25 Jan 2019 Fetching 'https://github.com/alternativesurfer/blacklists/blob/master/iplist.txt ' Fetching 'https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt' Fetching 'https://www.spamhaus.org/drop/drop.txt' Fetching 'https://www.spamhaus.org/drop/edrop.txt' Fetching 'https://www.spamhaus.org/drop/dropv6.txt' Fetching 'http://www.myip.ms/files/blacklist/general/latest_blacklist.txt' Fetching 'https://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt' Fetching 'https://www.team-cymru.org/Services/Bogons/fullbogons-ipv6.txt' Processing block file list (IPv4): ' github.com_iplist.txt rules.emergingthreats.net_emerging-Block-IPs.txt www.spamhaus.org_drop.txt www.spamhaus.org_edrop.txt www.spamhaus.org_dropv6.txt www.team-cymru.org_fullbogons-ipv4.txt www.team-cymru.org_fullbogons-ipv6.txt' iprange: Invalid address . iprange: Invalid address . iprange: Cannot understand line No 1 from /tmp/.BL/updBlackList.2-a0woV1: / iprange: Invalid address . iprange: Cannot understand line No 2 from /tmp/.BL/updBlackList.2-a0woV1: /1 Applying IPset (IPv4) Processing block file list (IPv6): ' github.com_iplist.txt rules.emergingthreats.net_emerging-Block-IPs.txt www.spamhaus.org_drop.txt www.spamhaus.org_edrop.txt www.spamhaus.org_dropv6.txt www.team-cymru.org_fullbogons-ipv4.txt www.team-cymru.org_fullbogons-ipv6.txt' Applying IPset (IPv6) ipset v6.23: Error in line 2: Syntax error: cannot parse /a: resolving to IPv6 address failed FATAL: inet6 ipset restore failed: error 1

I am using the following lists: https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt https://www.spamhaus.org/drop/drop.txt https://www.spamhaus.org/drop/edrop.txt https://www.spamhaus.org/drop/dropv6.txt http://www.myip.ms/files/blacklist/general/latest_blacklist.txt https://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt https://www.team-cymru.org/Services/Bogons/fullbogons-ipv6.txt https://github.com/alternativesurfer/blacklists/blob/master/iplist.txt

If I remove the last one, I do not get the error, but it is formatted exactly like all the others so I am not sure why its throwing the error... (successful update here):

Starting at 20:49:44 UTC Fri 25 Jan 2019 Fetching 'https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt' Fetching 'https://www.spamhaus.org/drop/drop.txt' Fetching 'https://www.spamhaus.org/drop/edrop.txt' Fetching 'https://www.spamhaus.org/drop/dropv6.txt' Fetching 'http://www.myip.ms/files/blacklist/general/latest_blacklist.txt' Fetching 'https://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt' Fetching 'https://www.team-cymru.org/Services/Bogons/fullbogons-ipv6.txt' Processing block file list (IPv4): ' rules.emergingthreats.net_emerging-Block-IPs.txt www.spamhaus.org_drop.txt www.spamhaus.org_edrop.txt www.spamhaus.org_dropv6.txt www.team-cymru.org_fullbogons-ipv4.txt www.team-cymru.org_fullbogons-ipv6.txt' Applying IPset (IPv4) Processing block file list (IPv6): ' rules.emergingthreats.net_emerging-Block-IPs.txt www.spamhaus.org_drop.txt www.spamhaus.org_edrop.txt www.spamhaus.org_dropv6.txt www.team-cymru.org_fullbogons-ipv4.txt www.team-cymru.org_fullbogons-ipv6.txt' Applying IPset (IPv6) IPv4 blocklist items fetched: 4794, unique: 4021, final: 29071 Total IPv4 prefix length count (including hosts): 3 IPv6 blocklist items fetched: 105340, unique: 105340, final: 105340 Total IPv6 prefix length count (including hosts): 58 Finished at 20:50:59 UTC Fri 25 Jan 2019

No idea what is going on...

the1ts commented 5 years ago

@alternativesurfer your issue is that you are using the github.com source view link, not the raw .txt output. Click on the raw button in github and use that url.

WaterByWind commented 5 years ago

Indeed using the 'raw' URL is the proper choice here, and has been confirmed to work as expected.

I've also added that reference to the sample fw-BlackList-URLs.txt list (should appear soon)