public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Tom Rymes <trymes@rymes.com>
To: development@lists.ipfire.org
Subject: Re: firewall oddities when accessing services at the far side of an IPsec N2N connection
Date: Sat, 25 Jan 2020 14:45:24 -0500	[thread overview]
Message-ID: <7599AEC0-F1FB-4CC3-8A3D-3EFB5304B878@rymes.com> (raw)
In-Reply-To: <ca856828-2d12-acb4-2813-4d08f4a0c012@ipfire.org>

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

Is this in any way related to what causes the issues with SIP and FTP, etc over IPSec unless the ALG is disabled?

> On Jan 25, 2020, at 11:12 AM, Peter Müller <peter.mueller(a)ipfire.org> wrote:
> 
> Hello list,
> 
> due to reasons, I currently work on migrating an upstream (Squid) proxy
> machine from HardenedBSD connected via OpenVPN to OpenBSD connected via IPsec.
> 
> The latter one seems to work since the connection is stable and SSH usage
> over the tunnel is possible. However, using the remote Squid proxy as an
> upstream proxy (refer to corresponding setting in proxy.cgi) is impossible
> as responses are not answered from the remote side:
> 
>> [root(a)maverick ~]# export http_proxy="http://10.xxx.xxx.2:3128/"
>> [root(a)maverick ~]# wget -vv example.com
>> --2020-01-25 16:58:00--  http://example.com/
>> Connecting to 10.xxx.xxx.2:3128... connected.
>> Proxy request sent, awaiting response... 
>> (wget stalls and eventually runs in a timeout)
> 
> Oddly enough, doing the same thing on a machine within the GREEN network works:
> 
>> user(a)machine:~> export http_proxy="http://10.xxx.xxx.2:3128/"
>> user(a)machine:~> wget -vv heise.de
>> --2020-01-25 16:59:26--  http://heise.de/
>> Verbindungsaufbau zu 10.xxx.xxx.2:3128 … verbunden.
>> Proxy-Anforderung gesendet, auf Antwort wird gewartet … 407 Proxy Authentication Required
>> 2020-01-25 16:59:26 FEHLER 407: Proxy Authentication Required.
> However, a SSH login _is_ possible from the firewall machine to the remote
> IPsec one, which makes me writing this mail as I am not sure about the behaviour's
> root cause.
> 
> Connecting to the IPsec machine seems to require a firewall rule like this:
> - source: firewall (any)
> - use NAT: yes, source NAT enabled, new source IP address = GREEN
> - destination: IPsec remote machine
> - protocol: any
> 
> If source NAT is omitted, accessing the IPsec machine is not possible via
> any given way (ping, SSH, Squid, ...). However, _if_ SNAT is enabled, it
> also affects connections made from the machine within the GREEN network.
> 
> As far as I am concerned, there are two oddities:
> (a) Even with SNAT enabled, the firewall itself is unable to reliably establish
> a connection to an remote IPsec destination.
> (b) If SNAT is enabled for outgoing traffic generated by the firewall, it
> also seems to affect traffic from GREEN/... sources, while it is not configured
> to do so.
> 
> Is there anybody who got remote upstream proxies via IPsec working?
> Are (a) and (b) bugs? If not: What shall I do to work around these?
> 
> Thanks, and best regards,
> Peter Müller

  reply	other threads:[~2020-01-25 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-25 16:10 Peter Müller
2020-01-25 19:45 ` Tom Rymes [this message]
2020-01-26 12:01   ` Peter Müller
2020-01-26  9:58 ` Michael Tremer
2020-01-26 12:04   ` Peter Müller
2020-01-26 16:22     ` Peter Müller
2020-01-26 17:14       ` Peter Müller
2020-01-26 20:37         ` Michael Tremer
2020-01-26 20:36     ` 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=7599AEC0-F1FB-4CC3-8A3D-3EFB5304B878@rymes.com \
    --to=trymes@rymes.com \
    --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