From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: aaffee@follett.com
Subject: BUG #15655: local machines pushed openvpn dns issue
Date: Mon, 25 Feb 2019 19:09:50 +0000
Message-ID: <15655-523709ed14373034@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15655
Logged by: Anthony Affee
Email address: aaffee@follett.com
PostgreSQL version: 9.4.1
Operating system: MacOS
Description:
Hi,
The psql command line for MacOS looks to external DNS resolution first.
Once it fails, it then looks to the local machines DNS to resolve hostname.
My instance details for this report is among more than 20 people in my
company with the same if not identical setup as below.
MacOS: Any version but specifically latest release
OpenVPN Server: Latest server release
OpenVPN Client: Tunnelblick latest release
PostgreSQL Server: RedShift Latest release
RedShift Network: Internal/Private Only
Client DNS: Internal AWS DNS Primary server pushed in configuration to
override client
Error:
[anthony@Anthonys-Mini ~]$ psql
'postgresql://username:passwordhidden@redshifthidden.us-east-1.redshift.amazonaws.com:5439/dbname'
psql: could not connect to server: Operation timed out
Is the server running on host
"redshifthidden.us-east-1.redshift.amazonaws.com" (34.206.57.41) and
accepting
TCP/IP connections on port 5439?
After the first attempt to connect over the VPN is made, the above error is
given after it hangs for a while. As soon as the error is given and I
attempt to try again, the connection works nearly instantly. As you can see
above, the DNS is resolving the external IP address for this RedShift
instance. Since the local MacOS is pushed an internal DNS resolver, this
clearly is not using the local computers DNS, rather it appears to be using
a hard coded DNS from psql. We use many different apps and technologies and
RedShift with psql is the only DNS issue presented. We need psql to look for
the local machines DNS. Once it connects successfully, MacOS caches this DNS
and it will work for a while without an issue. NSLookup command even works
on the first attempt and displays the correct internal DNS IP for
RedShift.
Here is what the second and successful attempt looks like:
[anthony@Anthonys-Mini ~]$ psql
'postgresql://username:passwordhidden@redshifthidden.us-east-1.redshift.amazonaws.com:5439/dbname'
psql (9.4.1, server 8.0.2)
SSL connection (protocol: TLSv1, cipher: DHE-RSA-AES256-SHA, bits: 256,
compression: off)
Type "help" for help.
dbname=#
Can you help us resolve this? This is a big compatibility issue for
environments that rely on OpenVPN to connect to Cloud technologies.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, aaffee@follett.com
Subject: Re: BUG #15655: local machines pushed openvpn dns issue
In-Reply-To: <15655-523709ed14373034@postgresql.org>
References: <15655-523709ed14373034@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox