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

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

This thread was automatically locked due to age.
  • Hi Stephan,

    If you SSH to the iView server. run "iptables -L | GREP 5432" this will tell you if the port is open. I'm tipping there's not a firewall rule to allow you to access the PostgreSQL Server from your PC.

    Remember that this voids support for the appliance. But my advice to get this working is:

    1. Add the iptables rule allowing conenctions to 5432.
    2. Add a user to Database iviewdb for read only.
    3. Play at your own risk.
  • 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.
  • 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 (in this case, refers to the UTM, i.e. the other end of the tunnel)

    -Installed pgAdmin 4.1 and entered (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: "UTM_IP"

    In pgAdmin on my Laptop, I entered the following:

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

    Did I do something wrong? Please help.

    Thank you very much