PostOverflow whitelist using forward DNS

Hi there!

Some time ago, I successfully whitelisted my ISP, see this thread for reference: Can't make postoverflow whitelist to work.

Now, I’d like to whitelist only my residential IP address, as all Orange/Wanadoo addresses is way too much for a whitelist :wink:

Problem: my home IP address may vary in time.
In my ISP router (LiveBox), I successfully setup a dynamic DNS (freeddns.org) for A record.
But I can’t change the reverse (PTR), Orange won’t allow.

So, question is: how to write a PostOverflow whitelist, using my dynamic A DNS record (myhome.freeddns.org)?
Or: can we compare the IP address with a forward DNS (A) request result, in expression ?

Any idea welcome, thanks in advance!

In the recent 1.4.2 release you can use this helper IP helpers | CrowdSec there is an example attached. This will go in postoverflow folder /etc/crowdsec/postoverflows/s01-whitelist/ if the folder doesnt exist

Edit 23/11/23: fix link to new documentation

1 Like

This is a very nice enhancement, thank you very much! :smiley_cat: