ntop / ipt_geofence

Geographical host protection for Linux/FreeBSD
GNU Affero General Public License v3.0
105 stars 15 forks source link

Local IPs get banned #30

Open kiwimato opened 3 months ago

kiwimato commented 3 months ago

Hello,

I see local IPs get banned:

root@UniFi-Video:~# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N IPT_GEOFENCE_BLACKLIST
-N f2b-sshd
-A INPUT -j IPT_GEOFENCE_BLACKLIST
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.133/32 -j DROP
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.135/32 -j DROP
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.143/32 -j DROP
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.137/32 -j DROP
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.134/32 -j DROP
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.132/32 -j DROP
-A IPT_GEOFENCE_BLACKLIST -s 192.168.123.130/32 -j DROP

I tried adding them in whitelist.txt, but they got auto removed, is there any logic that does this? Or maybe I have a sync issue. Or is there any other way to avoid blocking local IPs or CIDR blocks?

Thank you! Super nice code btw!