OPNsense Forum

English Forums => General Discussion => Topic started by: Netzblicker on September 01, 2024, 04:10:36 PM

Title: Changing GeoIP / try to apply ends with an error
Post by: Netzblicker on September 01, 2024, 04:10:36 PM
I'm using GeoIP to exclude the most countries to connect to my servers. Today I want to allow a new country to connect, saved it and want to apply. The following error:
Error loading alias [Blocked_Countries]: Unknown error: -1. {current_size: 509163, new_size: 548342}

Any idea what happend and how to fix?

OPNsense 23.10.1_2-amd64
FreeBSD 13.2-RELEASE-p7
OpenSSL 1.1.1w
Licensed until 2026-08-03
Title: Re: Changing GeoIP / try to apply ends with an error
Post by: meyergru on September 01, 2024, 04:20:14 PM
See the tips section for geoip, second tip: https://docs.opnsense.org/manual/aliases.html#geoip
Title: Re: Changing GeoIP / try to apply ends with an error
Post by: doktornotor on September 01, 2024, 06:15:39 PM
Quote from: Netzblicker on September 01, 2024, 04:10:36 PM
I'm using GeoIP to exclude the most countries to connect to my servers.
Error loading alias [Blocked_Countries]: Unknown error: -1. {current_size: 509163, new_size: 548342}

Well, you are doing it wrong. Set up an alias called Allowed_Countries and redesign your rules to use that (the "Invert" checkbox will be helpful). This is also hinted in the documentation linked above by meyergru.
Title: Re: Changing GeoIP / try to apply ends with an error
Post by: mperu99 on November 08, 2024, 10:07:23 PM
I am getting the same error 
Error loading alias [GeoIPLite2_IN]: Invalid argument. {current_size: 0, new_size: 556698}


EDIT UPDATE!

I think i fixed it, i changed the maximum table entries from 1000000 to 3000000 and was able to go back and save with no error.. 

goto firewall > settings > advanced > maximum table entries (will be blank to start)
Title: Re: Changing GeoIP / try to apply ends with an error
Post by: meyergru on November 08, 2024, 10:20:41 PM
And the remedy is probably also the same as has been pointed to before. Read the documentation thoroughly and you will get at least two hints on how to fix this problem.