Обсуждение: Can't Remote connection by IpV6

Поиск
Список
Период
Сортировка

Can't Remote connection by IpV6

От
Marcelo Marloch
Дата:
Hi everyone, is it possible to remote connect through IpV6? IpV4 works fine but I cant connect through V6

postgresql.conf is to listen all address and pg_hba.conf is set with host all all :: md5 i've tried ::/0 and ::0/0 but had no success

my provider is out of ipv4 and they're sending ips by cgnat if I want a public ipv4 I have to sign a very expensive service fee 

thanks a lot

Re: Can't Remote connection by IpV6

От
Kashif Zeeshan
Дата:
Hi Marcelo

Yes it's possible to connect remotely with postgres with ipv6 e.g. with psql.
If you are facing issues then you need to make sure that you have done the required configurations.

Please refer to the following links for more details.


Regards
Kashif Zeeshan
Bitnine Global

On Thu, Jun 6, 2024 at 7:46 PM Marcelo Marloch <mmarloch@gmail.com> wrote:
Hi everyone, is it possible to remote connect through IpV6? IpV4 works fine but I cant connect through V6

postgresql.conf is to listen all address and pg_hba.conf is set with host all all :: md5 i've tried ::/0 and ::0/0 but had no success

my provider is out of ipv4 and they're sending ips by cgnat if I want a public ipv4 I have to sign a very expensive service fee 

thanks a lot

Re: Can't Remote connection by IpV6

От
Adrian Klaver
Дата:
On 6/6/24 07:46, Marcelo Marloch wrote:
> Hi everyone, is it possible to remote connect through IpV6? IpV4 works 
> fine but I cant connect through V6
> 
> postgresql.conf is to listen all address and pg_hba.conf is set with 
> host all all :: md5 i've tried ::/0 and ::0/0 but had no success

Is the firewall open for IPv6 connections to the Postgres port?

Did you reload the server after making the configuration changes?

Define in more detail what 'no success' means.

> 
> my provider is out of ipv4 and they're sending ips by cgnat if I want a 
> public ipv4 I have to sign a very expensive service fee
> 
> thanks a lot

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: Can't Remote connection by IpV6

От
Ron Johnson
Дата:
On Thu, Jun 6, 2024 at 11:03 AM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 6/6/24 07:46, Marcelo Marloch wrote:
> Hi everyone, is it possible to remote connect through IpV6? IpV4 works
> fine but I cant connect through V6
>
> postgresql.conf is to listen all address and pg_hba.conf is set with
> host all all :: md5 i've tried ::/0 and ::0/0 but had no success

Is the firewall open for IPv6 connections to the Postgres port?

netcat (comes with nmap) is great for this.  There's a Windows client, too.
 

Re: Can't Remote connection by IpV6

От
Alan Hodgson
Дата:
On Thu, 2024-06-06 at 11:46 -0300, Marcelo Marloch wrote:
Hi everyone, is it possible to remote connect through IpV6? IpV4 works fine but I cant connect through V6

postgresql.conf is to listen all address and pg_hba.conf is set with host all all :: md5 i've tried ::/0 and ::0/0 but had no success

my provider is out of ipv4 and they're sending ips by cgnat if I want a public ipv4 I have to sign a very expensive service fee 

thanks a lot

listen '*'

or listen '::' just for ipv6.

Remember to adjust pg_hba.conf as well.

Re: Can't Remote connection by IpV6

От
Adrian Klaver
Дата:
On 6/6/24 10:37, Marcelo Marloch wrote:

Reply to list also.
Ccing list

> Hi Adrian thanks for your help, Server is running on windows and I set 
> open 5432 port on windows firewall, I did not see any options regarding 
> if ipv4 or v6. client also uses windows  and connects through odbc 
> driver. over ipv4 it connects flawlessly if it got a public ipv4 but 
> when I set odbc driver server field to an Ipv6 it shows message: 
> connection to server at (ipv6 ip), port 5432 failed: Connection time 
> out(0x0000274C/10060) is the server running on that host and accepting 
> TCP/IP connections? the same message is shown if provider sets to me a 
> not public ipv4

To be clear the Postgres server is running on a Windows instance that is 
itself running on a cloud(?) provider. Seems to me this still points at 
a firewall, namely one the provider has set up in front of your Windows 
instance. The hint would be the public IPv4 address working vs the 
private IPv4 address not working. There is also the issue of whether the 
IP addresses that are not on the public side of the internet are being 
drawn from IP private network ranges(see 
https://en.wikipedia.org/wiki/IP_address) that are not publishable to 
the public internet. You may need to talk with the provider and see how 
they suggest you punch a hole through to your Postgres server.

> 
> thank you very much!
> 
> Em qui., 6 de jun. de 2024 às 12:03, Adrian Klaver 
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> escreveu:
> 
>     On 6/6/24 07:46, Marcelo Marloch wrote:
>      > Hi everyone, is it possible to remote connect through IpV6? IpV4
>     works
>      > fine but I cant connect through V6
>      >
>      > postgresql.conf is to listen all address and pg_hba.conf is set with
>      > host all all :: md5 i've tried ::/0 and ::0/0 but had no success
> 
>     Is the firewall open for IPv6 connections to the Postgres port?
> 
>     Did you reload the server after making the configuration changes?
> 
>     Define in more detail what 'no success' means.
> 
>      >
>      > my provider is out of ipv4 and they're sending ips by cgnat if I
>     want a
>      > public ipv4 I have to sign a very expensive service fee
>      >
>      > thanks a lot
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com