This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Remote access postgresql tables

Hi,
I want to use pgAdmin on my local computer to browse in the tables.
The postgresql Port is listening (checked with netstat), but I can't connect.
I'll get a timeout.
Is there anything else I have to configure?

Best regards
Stephan


This thread was automatically locked due to age.
Parents
  • Thanks, bennyv.
    It sounds a little bit funny, but how do I add a new rule?
    I tried "ipchains -A INPUT  -i eth0 -p tcp –dport 5432 -j ACCEPT" but nothing happend.
    No error and no effect.
    "iptables -L | GREP 5432" doesn't show anything.
Reply
  • Thanks, bennyv.
    It sounds a little bit funny, but how do I add a new rule?
    I tried "ipchains -A INPUT  -i eth0 -p tcp –dport 5432 -j ACCEPT" but nothing happend.
    No error and no effect.
    "iptables -L | GREP 5432" doesn't show anything.
Children
  • Hey Mate,

    Sorry for the stupid late reply. I forgot to check back. Hopefully this article helps. Linux: Iptables Allow PostgreSQL server incoming request

    I'm not sure of your setup, but if you've got a production system at the moment. I recommend installing the trial and testing everything on the trial before you touch production.
  • Hi All,

     

    I wanted to add that I was finally able to get this working, so I thought I would share. Clearly the UTM is locked down and doesn't allow access to the database from external sources. Instead of playing with IP Tables and possibly making the firewall weaker, I did the following:

     

    -Logged into Webadmin, Enabled SSH, set password for LoginUser account

    -Created a PuTTY session to UTM internal address from internal network, setting up a port forward tunnel. I mapped local port 5432 to 127.0.0.1:5432 (in this case, 127.0.0.1 refers to the UTM, i.e. the other end of the tunnel)

    -Installed pgAdmin 4.1 and entered 127.0.0.2 (backup localhost address for Windows PCs.. may work with .1, but I've had issues using .1 w/RDP port tunneling in the past, so it's habit) as the IP to use, and boom went right in.

     

    Hope this helps someone else. Now I just need to figure out where to change the setting for SMTP Logging. I can't deal with 30 days.. I run a small mail server with not a lot of traffic. I'll start with 90, but may go as high as 180.

     

    This was done on a Windows 7 x64 PC from the local network to the UTM.

  • Hi,

    Could you please show me how to setup a port forward tunnel. I've created it but still can't connect to postgresql. 

    First, I connect to the UTM via putty, then run this command:

    # ssh - L 3000:127.0.0.1:5432 "UTM_IP"

    In pgAdmin on my Laptop, I entered the following:

    • Hostname: 127.0.0.1
    • Port: 3000
    • User: postgres
    • Password: **********

    Did I do something wrong? Please help.

    Thank you very much