OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: feerlessleadr on December 22, 2024, 06:59:33 AM

Title: Can't get GeoIP Blocking to Work
Post by: feerlessleadr on December 22, 2024, 06:59:33 AM
Hi All - fairly new to opnsense but have been getting up to speed quickly.

I'm trying to setup geo-ip blocking on my WAN using aliases and firewall rules, but despite my best efforts IPs from countries I'm supposed to be blocking are still able to access services that I have externally exposed through caddy (hosted on a VM on proxmox behind OPNSense).

I followed the official documentation (here) to add maxmind db to opnsense, and everything updates correctly.

I then created an alias for the US (to test after I thought that the blocking wasn't working). I then created a firewall rule on my WAN (I have to use a vlan to connect to my fiber provider) and placed it at the top, with the attached settings. When I use my phone (not on wifi and not on VPN, located in the US), I'm still able to access all of my externally facing services.

Does anyone have an idea of what I'm doing wrong?

Thanks!

Title: Re: Can't get GeoIP Blocking to Work
Post by: AhnHEL on December 22, 2024, 09:31:22 PM
Did you reset the State Table after creating your rules?

Firewall: Diagnostics: States: Reset State Table
Title: Re: Can't get GeoIP Blocking to Work
Post by: feerlessleadr on December 23, 2024, 04:16:35 AM
Thanks for the suggestion - I tried doing that, but it still seems like my external services are visible from blocked countries.
Title: Re: Can't get GeoIP Blocking to Work
Post by: Seimus on December 23, 2024, 10:31:35 AM
And is the GeoIP table/Alias populated? or is it empty?

Regards,
S.
Title: Re: Can't get GeoIP Blocking to Work
Post by: cookiemonster on December 23, 2024, 04:47:51 PM
If is the top rule, shouldn't the destination be the WAN address ?