Thread: Allowing LAN connections

Allowing LAN connections

From
Jonas Gauffin
Date:
I've installed postgresql 8.2 on a windows vista machine and are trying to connect to it from another one.
the server has ip 192.168.1.100 and the client 192.168.1.102


As I understand it, I should make some configuration changes in pg_hba.conf to make this happen.
Both machines has both ipv4 and ipv6 installed (Vista standard I guess).

Ive tried some different settings in the pg_hba.conf (trying one at a time, commenting out the rest):

# IPv4 local connections:
#host    all         all         127.0.0.1/32          md5
#host    all         all         192.168.0.0/16        md5
host    all         all         0.0.0.0/0              md5
# IPv6 local connections:
#host    all         all         ::1/128               md5


I've also changed listten_addresses in postgresql.conf to:
listen_addresses = '*'

-----------------------------

I've installed VmWare player on the server. I guess that it's why it have so many adapters:
Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::7dba:9969:999b:5bfe%11
   IPv4 Address. . . . . . . . . . . : 192.168.1.100
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Wireless LAN adapter Wireless Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Local Area Connection 2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::440f:5179:acc9:5799%14
   IPv4 Address. . . . . . . . . . . : 192.168.243.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter Local Area Connection 3:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::d48:1d79:2215:543a%16
   IPv4 Address. . . . . . . . . . . : 192.168.11.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Tunnel adapter Local Area Connection* 6:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Local Area Connection* 7:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::5efe:192.168.1.100%12
   Default Gateway . . . . . . . . . :

Tunnel adapter Local Area Connection* 10:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Local Area Connection* 11:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::5efe:192.168.243.1%15
   Default Gateway . . . . . . . . . :

Tunnel adapter Local Area Connection* 12:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::5efe:192.168.11.1%17
   Default Gateway . . . . . . . . . :

------------------

And the client:
Ethernet-anslutning Anslutning till lokalt nätverk:

   Anslutningsspecifika DNS-suffix . :
   IPv4-adress . . . . . . . . . . . : 192.168.1.102
   Nätmask . . . . . . . . . . . . . : 255.255.255.0
   Standard-gateway. . . . . . . . . : 192.168.1.1

Tunnelanslutning: Anslutning till lokalt nätverk*:

   Tillstånd . . . . . . . . . . . . : Frånkopplad
   Anslutningsspecifika DNS-suffix . :

Tunnelanslutning: Anslutning till lokalt nätverk* 2:

   Anslutningsspecifika DNS-suffix . :
   Länklokal IPv6-adress . . . . . . : fe80::5efe:192.168.1.102%10
   Standard-gateway. . . . . . . . . :

(sorry for the swedish ;)

----------------------

Any suggestions?


Ta en titt på de nya onlinetjänsterna på Windows Live Betas -- så nya att de ännu inte har lanserats officiellt. Prova på!

Re: Allowing LAN connections

From
Steve Crawford
Date:
Jonas Gauffin wrote:
> I've installed postgresql 8.2 on a windows vista machine and are trying to connect to it from another one.
> the server has ip 192.168.1.100 and the client 192.168.1.102
>...
> Any suggestions?

Yes. Let us know what client you are using to connect and post the error
message you get on the client and any errors from the server log file.

I don't use Windows anywhere, but I presume Vista could have some
firewall software running that might interfere with external connections
as well.

Cheers,
Steve

Re: Allowing LAN connections

From
"Andrej Ricnik-Bay"
Date:
On 8/9/07, Jonas Gauffin <jonasvb@hotmail.com> wrote:
>  I've installed postgresql 8.2 on a windows vista machine and are trying to
> connect to it from another one.
> the server has ip 192.168.1.100 and the client 192.168.1.102
Before people start wrecking their brains on the postgres end....
have you established that the VMs can see each other on the
network at all?

And ruled out Vista security playing tricks on you?



Cheers,
Andrej

Re: Allowing LAN connections

From
Jonas Gauffin
Date:
Doh! It was the Vista firewall. I've got a couple of other services running on that machine and they worked. That's why I assumed that it wasn't a FW problem (using Vistas internal).
But it was

thanks.



> Date: Thu, 9 Aug 2007 10:06:19 -0700
> From: scrawford@pinpointresearch.com
> To: jonasvb@hotmail.com
> CC: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Allowing LAN connections
>
> Jonas Gauffin wrote:
> > I've installed postgresql 8.2 on a windows vista machine and are trying to connect to it from another one.
> > the server has ip 192.168.1.100 and the client 192.168.1.102
> >...
> > Any suggestions?
>
> Yes. Let us know what client you are using to connect and post the error
> message you get on the client and any errors from the server log file.
>
> I don't use Windows anywhere, but I presume Vista could have some
> firewall software running that might interfere with external connections
> as well.
>
> Cheers,
> Steve


Skaffa nya Windows Live Messenger! Prova på!