Showing results for 
Search instead for 
Did you mean: 
New Contributor

how do I access a database via hamachi

I want to access a postgresql database remotely over Hamachi.  Typically my database runs on port 5532.  I see hamachi running on port 2620 (I think).  Can I do this?  Will it work on a mesh or do I need a hub & spoke setup?  I am not sure how to resolve the different ports.


Your help is appreciated,



New Contributor

Re: how do I access a database via hamachi

I have now gotten this to work.  here is the answer to my own question:


I am using postgresql server.

1) set up DB server to run on the hamachi IP address instead of LAN ip address

2) postgress has a pg_hba.conf file where I had to add some info for connections:

(comments at end of line after "//" are not part of the file)



host       all                 all    md5     // existing for local access from computer

host       all                 all  md5     // my odd LAN network addressing, used this to test direct LAN access (not required for hamachi)

host       all                 all         md5     // added this.  I think this accepts connections from any IP

host       all                 all    md5  // alternative to above allows specific hamachi IP address access

host       all                 all         ::1/128            md5     // existing, not sure what this does


After changing this the db service must be restarted.


3) I am on a windows 8.1 PC.  Make sure PostgreSQL Server and pgAdmin III have access through Windows Firewall. pgAdmin III is an application for managing the database, handy to test access with.


4) On my Internet Security software, under Firewall->Application Rules make sure there are rules to allow In/Out TCP/UDP traffic on DB port for "friends" and similar for pgAdmin III


5) no changes required for router


6) on client computer might need similar rules to #3 & 4 above for your database access application.


yeah!  I hope this can help you.


New Contributor

access postgresql database problem

Dear Sir/Madam


Using hamachi i try to access my postgresql database, If i configure Pg_hba file in postgres giving hamachi vpn after restart my computer postgres database is not opeing give me a solution how i have to configue pg_hba file



# IPv4 local connections:
host    all         all          md5
host    all         all         2620:9b::1925:c1c/32          md5
# IPv6 local connections:
host     all     all     ::1/128     md5
host    all         all         2620:9b::1925:c1c/32          md5


Weather it is correct or i have to follow some other