Re: Server not listening

From: George Heller <george(dot)heller(at)yahoo(dot)com>
To: andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Server not listening
Date: 2007-04-25 16:04:44
Message-ID: 499124.11144.qm@web56503.mail.re3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

Thanks for that mail. I tried to follow the steps to create a tunnel, but when I add the connection, I dont really see an option to Save the settings. So make the changes and log in to my server with the actual hostname, it logs me in. I open another session on Putty, and the changes I made in the port forwarding are gone, I make the changes again, and try to log in using 'localhost' this time, it says Connection refused.

I also tried logging into PgAdmin using localhost, but it gave me the same error as before, only this time it said ip address 127.0.0.1

Thanks.
George.

Andy Shellam <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk> wrote:
Hi George,

OK the fact you cannot telnet from your XP machine to the server's
PostgreSQL port now suggests it's a problem getting to the server port.
Checking for the existence of a firewall is an ambiguous question I'm
afraid! There's not only the case of if there's a software firewall,
but is there a router between you and the server that's filtering out
other traffic?

What version of Linux are you running on the server?
Who originally set the server up?
Can they not tell you if there's a firewall on it?
Who set up the networks between you and the server?
Is there a router between you and the server, or a hardware firewall?

One thing that's just struck me that you can do in the interim (which is
actually better security but doesn't really answer your question)
because you have SSH access, is to tunnel PostgreSQL over SSH. This is
actually what I do, my firewall doesn't let anyone but the server
connect to PostgreSQL.

I take it you're using PuTTY to connect via SSH to the server? If so,
see this link to set up a tunnel.
http://docs.cs.byu.edu/docs/sshtunnels/3.php

In the tunneling setup in PuTTY (as described in the link above), set
the following:

Source port: 5432
Destination: 127.0.0.1:5432
Set it as Local, and Auto

Add the tunnel, then save the connection. Now when you connect to your
server via SSH, you'll have a port listening on 5432 on your local
machine. Whatever you send/receive from this port will be tunneled to
the server over SSH.

It's then as easy as instructing PgAdmin to connect to "localhost" on
port 5432, in the background it's actually connecting to your server.

HTH

Andy.

George Heller wrote:
> My XP machine is not in the same subnet as the server, but I have the
> IP address of my XP machine specified in the pg_hba.conf file. Is that
> not enough to let me access the database from my XP machine?
>
> I am able to do an SSH from my XP machine to the server, and also can
> access psql using it.
>
> I am also able to ping from my XP machine to the server, and this goes
> through fine.
>
> George
>
> */Raymond O'Donnell /* wrote:
>
> On 24/04/2007 06:43, George Heller wrote:
>
> > Ok, I tried a telnet from the command prompt of my XP machine,
> to the
> > linux server address on port 5432, something like,
> >
> > C:\> telnet 132.141.101.1 5432
> >
> > And this did 'not' go through. It said could not open connection to
> > host, connect failed.
>
> Well, this sounds like a network problem, as others have suggested.
> Check that your XP machine and the machine with the PostgreSQL server
> are on the same subnet, or are otherwise able to talk to each
> other. Are
> you able to use telnet or ssh to open a terminal session from one
> to the
> other? Did you try using psql to connect to the DBMS?
>
> Ray.
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod(at)iol(dot)ie
> ---------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> !DSPAM:37,462e0ab389291241012752!


---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Andy Shellam 2007-04-25 19:03:59 Re: Server not listening
Previous Message Andy Shellam 2007-04-24 19:29:52 Re: Server not listening