Welcome to the Hamachi Community!
Reply
New Contributor
Posts: 2
Registered: ‎04-13-2015

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,

Thanks

webcoyote

New Contributor
Posts: 2
Registered: ‎04-13-2015

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)

 

# TYPE  DATABASE    USER    ADDRESS          METHOD

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

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

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

host       all                 all         25.55.47.11/32    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.

Chuck

New Contributor
Posts: 1
Registered: ‎08-16-2017

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

 


# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# IPv4 local connections:
host    all         all         127.0.0.1/32          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

 

Regards

S.Selvaganapathi