diff --git a/plugins/ident/geoip b/plugins/ident/geoip index bb8b193..df66dd1 100644 --- a/plugins/ident/geoip +++ b/plugins/ident/geoip @@ -195,6 +195,7 @@ sub geoip2_lookup { my $self = shift; my $ip = $self->qp->connection->remote_ip; + return DECLINED if $self->is_localhost($ip); if ($self->{_geoip2_city}) { my $city_rec = $self->{_geoip2_city}->city(ip => $ip); @@ -223,6 +224,8 @@ sub geoip2_lookup { sub geoip_lookup { my $self = shift; + return DECLINED if $self->is_localhost($self->qp->connection->remote_ip); + # reopen the DB if Geo::IP failed due to DB update $self->open_geoip_db();