#6 ipfire: script "fails" when cidr not reachable

Closed
opened 4 years ago by DB4711 · 4 comments
DB4711 commented 4 years ago

Hello,

first thanks for maintaining this script. I use it since day ~0 on my ipfire :)

Sometimes the script has problems downloading the cidr-report.org list. It seems that it is a DNS problem on my site. The script runs but then "destroyes" the ipfire rules. I have to run it again. Then it works. Maybe first connect to cidr-report.org fails or takes too long.

However. It would be great if there would be some error handling implemented. E.g. a function checking the URLs before downloading. If it fails, script will try again, end without changes on the system or run again.

Maybe something like that:

if [[ wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK' ]];

Kind regards

Hello, first thanks for maintaining this script. I use it since day ~0 on my ipfire :) Sometimes the script has problems downloading the cidr-report.org list. It seems that it is a DNS problem on my site. The script runs but then "destroyes" the ipfire rules. I have to run it again. Then it works. Maybe first connect to cidr-report.org fails or takes too long. However. It would be great if there would be some error handling implemented. E.g. a function checking the URLs before downloading. If it fails, script will try again, end without changes on the system or run again. Maybe something like that: if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; Kind regards
maloe commented 4 years ago
Owner

Seems like Problems with the source download increases, because others mentioned empty rules, too. There is already a new version prepared with a pre-check, if the site is reachable. But it's not perfect, because between pre-check and download it can fail again. I think I will upload it in a few days.

Better would be a check or comparison after the consolidation, because the site could be reachable but empty or the download interrupts. It's on my todo list ;)

Anyway for know the option -i|--interactive might be helpful? Thanks and best regards

Seems like Problems with the source download increases, because others mentioned empty rules, too. There is already a new version prepared with a pre-check, if the site is reachable. But it's not perfect, because between pre-check and download it can fail again. I think I will upload it in a few days. Better would be a check or comparison after the consolidation, because the site could be reachable but empty or the download interrupts. It's on my todo list ;) Anyway for know the option -i|--interactive might be helpful? Thanks and best regards
DB4711 commented 4 years ago
Poster

Yes, that's exactly the problem. Noone told that at notabug :( I thought it would be a good idea to report it here. Thanks a lot!

Yes, that's exactly the problem. Noone told that at notabug :( I thought it would be a good idea to report it here. Thanks a lot!
maloe commented 4 years ago
Owner

FYI, just uploaded v0.7.10 with a simple source pre-check, using option -c|--check. Also the wiki page was updated, with referring chapters 1.5 and 4.4.

FYI, just uploaded v0.7.10 with a simple source pre-check, using option -c|--check. Also the wiki page was updated, with referring chapters 1.5 and 4.4.
DB4711 commented 4 years ago
Poster

Hello maloe,

thanks for this! I tested it successfully!

Thanks again :)

Hello maloe, thanks for this! I tested it successfully! Thanks again :)
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.