Re: Cannot Access Remote Server [SOLVED]

Поиск
Список
Период
Сортировка
От Tom Browder
Тема Re: Cannot Access Remote Server [SOLVED]
Дата
Msg-id CAFMGiz_osfGcmGqeCSVhLesGQN3cj+u6aF_1A2nNQLMfEJEHwQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Cannot Access Remote Server [SOLVED]  (Thom Brown <thom@linux.com>)
Список pgadmin-support
On Fri, Aug 19, 2011 at 05:47, Tom Browder <tom.browder@gmail.com> wrote:
> On Fri, Aug 19, 2011 at 01:09, Guillaume Lelarge <guillaume@lelarge.info> wrote:
>> On Thu, 2011-08-18 at 20:41 -0500, Tom Browder wrote:
>>> >> I have a remote server running postgresql (9.0.4).  I have been able
>>> >> to use the dbms via ssh and via phppgadmin.
>>> >>
>>> >> Now I would like to use pgadminIII but I cannot get the server
>>> >> connection.  I am running the Ubuntu version og pgadmin (1.10.5).
> ...
>> Any firewalls, routers that could block the connection?
>
>> Have you tried to connect with psql from the same computer than pgAdmin?
>
> Just tried--no contact.
>
> I muddled around in my notes--had same trouble I now see with mysql
> and had to open up its port with iptables.  I just tried the same
> thing for postgresql and did:
>
> # iptables -A INPUT -p tcp --destination-port 5432 -s x.x.x.x
>
> where x.x.x.x is my external IP from my home network.  I restarted
> postgresql just in case but no connection.

SOLVED!!

I redid the iptables command because the line above is incorrect, it
should read:

# iptables -A INPUT -p tcp --destination-port 5432 -s x.x.x.x -j ACCEPT

Note that the previous rule had to be deleted which I did by editing
the file /etc/iptables/default and removing it and saving the file (I
think there is a safer way but I didn't know how and was afraid I
might remove the wrong rule).

Note also there are some differences between Ubuntu and Fedora, for
example the location of the rules file. If I have to do this again I
would save file /etc/iptabes/default before I start messing with it.

After deleting the old rule and making the corrected rule with the
iptables command I did:
 # /etc/init.d/iptables save # /etc/init.d/iptables restart

and I got in!

Thanks Thom.

Best regards,

-Tom (Thomas)


В списке pgadmin-support по дате отправления:

Предыдущее
От: Tom Browder
Дата:
Сообщение: Re: Cannot Access Remote Server
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Cannot Access Remote Server [SOLVED]