Logging on with my Public IP address?

TBS andyh at totallybrilliant.com
Wed Jan 26 16:52:46 UTC 2022


Das

2 things to check…...

1 - in your pg_hba.conf file have you ‘allowed’ access from the outside world address ? Postgres uses this file as a security test as to who is allowed access - which needs to be set first and then Postgres restarted - if you are on a non-fixed ip your only option would be to open up the whole world to your Postgres database which is probably not ideal - so what I would suggest is that you also changed your Postgres install (using the postresql.conf) to use a non-traditional port (so change it from 5432 to something wacky like 38753 (number at random in port range)

2 - using the outside world IP address will typically route your traffic out and then back in again - so you would also then need to ensure that your internet router is properly forwarding traffic from whichever port you end up running Postgres under - to your server on 192.168.1.3 - otherwise your external traffic simply won’t be seeing the database - and that’s probably your issue at the moment (well you need both of these points addressing !)

Hope that may help

Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870
Phone (UK) : 0207 193 8582
Web : www.totallybrilliant.com
Helpdesk : http://totallybrilliant.kayako.com
Email : andyh at totallybrilliant.com
On Jan 26, 2022, 11:45 AM -0500, Das Goravani <goravanis at gmail.com>, wrote:
>
> I use the NO-IP service for IP address. I do not have a fixed IP.
>
> I can log onto my PG database from a local computer on my home network where my server is using 192.168.1.3
>
> Which is my servers current local address.
>
> But when I use my public IP address of 142.197.254.173 then I cannot log onto my PG database.
>
> Why is that?
>
> I want to be able to present the ability for others around the country to log onto my server’s PG database for a demo I am making.
>
> So I want to use my public IP address for logging on I believe.. right? Isn’t that right?
>
> When I try to run the following code, it takes a long pause on the $logon line.. and returns flag false
>
> This is my logon code:
>
>
> Calculate iUserName as $ctask.tUserRow.rep_username
> Calculate iUserPassword as $ctask.tUserRow.rep_password
>
> Do $ctask.tSessObjPG.$logoff()
> Do $root.$sessions.PGSESSION.$logoff()
>
> Do tSessObjPG.$port.$assign(5432)
> Do tSessObjPG.$database.$assign('DasPGDB')
> Do tSessObjPG.$hostname.$assign('142.197.254.173')
> Do tSessObjPG.$logon('142.197.254.173',iUserName,iUserPassword,'PGSESSION') Returns #F
> If flag true
> Do tSessObjPG.$newstatement('StatObjPG') Returns tStatObjPG
> Do $ctask.tStatObjPG.$maxresultsetsize.$assign(2,147,483,647)
> Calculate tSessObjPGRef as $extobjects.PGSQLDAM.$objects.PGSQLSESS.$newref()
> Calculate $ctask.tStatObjPGRef as $ctask.tSessObjPG.$newstatementref()
> End If
> Quit method #F
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


More information about the omnisdev-en mailing list