public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Matthias Fischer <matthias.fischer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] firewall: Accept traffic on loopback interface if source and destination are within 127.0.0.0/8 only
Date: Tue, 19 May 2020 22:23:18 +0200	[thread overview]
Message-ID: <f11959ea-0166-21a5-9d86-60a3d2404e13@ipfire.org> (raw)
In-Reply-To: <db2bff45-1b6a-bc96-1de3-908442c95447@ipfire.org>

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

Hi,

sorry, no idea. The only thing I've found is that "squidGuard uses
Squid's [8]standard redirector interface".

*If* 'squidguard' is the culprit here.

Best,
Matthias

On 19.05.2020 15:06, Peter Müller wrote:
> Hello Matthias, hello list,
> 
> why is that traffic passing through the loopback interface?!
> 
> Thanks, and best regards,
> Peter Müller
> 
>> Hi,
>> 
>> perhaps its only me, but after applying this patch for testing purposes
>> I don't see any (redirected) urlfilter block pages anymore.
>> 
>> Only the firewall logs are telling me:
>> 
>> ...
>> REJECT_INPUT lo TCP 192.168.100.254 53464 192.168.100.254 81
>> ...
>> 
>> I had to build a new "Incoming Firewall Access" rule (INPUTFW) allowing
>> TCP traffic from (e.g.) 192.168.100.254/32 to GREEN (192.168.100.254) to
>> TCP port 81 to see a block page again...
>> 
>> Only me?
>> 
>> Best,
>> Matthias
>> 
>> On 14.05.2020 12:36, Michael Tremer wrote:
>>> Hello,
>>>
>>> This is indeed *very* unlikely, but I am okay with this patch being accepted.
>>>
>>> Acked-by: Michael Tremer <michael.tremer(a)ipfire.org>
>>>
>>> Best,
>>> -Michael
>>>
>>>> On 13 May 2020, at 21:21, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>>>>
>>>> This ensures traffic on the loopback interface matches the IPv4
>>>> loopback characteristics (source and destination are within 127.0.0.0/8)
>>>> and prevents any damage in the unlikely case of non-loopback traffic
>>>> being injected/emitted (in)to the loopback interface.
>>>>
>>>> Cc: Arne Fitzenreiter <arne.fitzenreiter(a)ipfire.org>
>>>> Cc: Michael Tremer <michael.tremer(a)ipfire.org>
>>>> Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
>>>> ---
>>>> src/initscripts/system/firewall | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/src/initscripts/system/firewall b/src/initscripts/system/firewall
>>>> index 00512d9fa..409aaf7a9 100644
>>>> --- a/src/initscripts/system/firewall
>>>> +++ b/src/initscripts/system/firewall
>>>> @@ -219,10 +219,10 @@ iptables_init() {
>>>> 	iptables -A INPUT -j ICMPINPUT
>>>> 	iptables -A ICMPINPUT -p icmp --icmp-type 8 -j ACCEPT
>>>>
>>>> -	# Accept everything on loopback
>>>> +	# Accept everything on loopback if both source and destination are within 127.0.0.0/8
>>>> 	iptables -N LOOPBACK
>>>> -	iptables -A LOOPBACK -i lo -j ACCEPT
>>>> -	iptables -A LOOPBACK -o lo -j ACCEPT
>>>> +	iptables -A LOOPBACK -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT
>>>> +	iptables -A LOOPBACK -o lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT
>>>>
>>>> 	# Filter all packets with loopback addresses on non-loopback interfaces.
>>>> 	iptables -A LOOPBACK -s 127.0.0.0/8 -j DROP
>>>> -- 
>>>> 2.26.1
>>>
>> 
> 


  reply	other threads:[~2020-05-19 20:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 20:21 Peter Müller
2020-05-14 10:36 ` Michael Tremer
2020-05-18 21:03   ` Matthias Fischer
2020-05-19  8:20     ` Michael Tremer
2020-05-19  8:21       ` Michael Tremer
2020-05-19  8:35         ` Matthias Fischer
2020-05-19 13:06     ` Peter Müller
2020-05-19 20:23       ` Matthias Fischer [this message]
2020-05-20 12:47       ` 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=f11959ea-0166-21a5-9d86-60a3d2404e13@ipfire.org \
    --to=matthias.fischer@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