public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: GeoIP Blocked IPs not being logged
Date: Wed, 06 Feb 2019 17:18:34 +0000	[thread overview]
Message-ID: <2963A1FF-496E-44EE-9F79-B4CBAFE799F2@ipfire.org> (raw)
In-Reply-To: <q3a9k5$ugk$1@tuscan3.grantura.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

Hello Rob,

Thank you for submitting this patch.

There are several issues with this patch:

* It has been line-wrapped and therefore does not apply

* It is actually intended behaviour of the GeoIP filter to not log those. Many systems are flooded with log messages and this filter is supposed to skim some things out entirely.

However, I do not think that this is a bad idea, but it should be configurable on the firewall options page.

-Michael

> On 4 Feb 2019, at 21:08, Rob Brewer <ipfire-devel(a)grantura.co.uk> wrote:
> 
> Hi
> 
> After adding a few country codes with the GeoIP Configuration page, Geo 
> blocked IPs no longer appear in the Firewall Logs.
> 
> This might be the intended operation but for me I would like to log these 
> blocked IPs and have added a logging rule to /usr/lib/firewall/rules.pl
> 
> This is my patch for rules.pl which I have tested on my live IPFire and is 
> working OK.
> 
> diff -u build/usr/lib/firewall/rules.pl.orig build/usr/lib/firewall/rules.pl
> --- build/usr/lib/firewall/rules.pl.orig        2019-02-04 
> 20:59:34.677143496 +0000
> +++ build/usr/lib/firewall/rules.pl     2019-02-04 21:01:59.445137411 +0000
> @@ -609,6 +609,8 @@
>        # is enabled.
>        foreach my $location (@locations) {
>                if(exists $geoipsettings{$location} && 
> $geoipsettings{$location} eq "on") {
> +      # add logging for geoip rwb 4/2/19
> +                        run("$IPTABLES -A GEOIPBLOCK -m geoip --src-cc 
> $location -j LOG --log-prefix 'GEOIPBLOCK-$location '");
>                        run("$IPTABLES -A GEOIPBLOCK -m geoip --src-cc 
> $location -j DROP");
>                }
>        }
> 
> 
> Regards
> 
> Rob
> 
> 


  reply	other threads:[~2019-02-06 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 21:08 Rob Brewer
2019-02-06 17:18 ` Michael Tremer [this message]
2019-02-06 21:48   ` Rob Brewer
2019-02-10 16:07     ` Rob Brewer
2019-02-14 11:14       ` Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2963A1FF-496E-44EE-9F79-B4CBAFE799F2@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox