Here is my situation.
I have Postgresql installed on a Windows Server on a LAN.
I have an IIS web server set up outside the lan. I want to connect to the postgresql database from the webserver.
Postgresql server IP: 192.168.x.1
Firewall Internal IP: 192.168.x.2
Firewall External IP: 72.x.x.100
Webserver IP - Internal LAN access: 192.168.x.3
Webserver IP - External LAN access: 70.x.x.100
The pg_hba.conf file has an entry:
host all all 0.0.0.0/24 md5
The postgresql.conf file has an entry:
listen_addresses = '*'
This should remove all restrictions on access from the database end.
My ultimate intention is to have a GIS application accessing this database to incorporate data into a mapping website. At this point, I am just trying to access postgresql at all from the webserver using PgAdmin.
With this configuration, assuming that the 5432 port is opened correctly on the firewall, what IP address should I be placing in the
Host box for the PGAdmin server connection? My initial thought is that it should be the
Firewall External IP: 70.x.x.100, but is this correct?
Lastly, and I'll split this off into a new question if need be: Is this configuration even logical from a performance and security viewpoint, or should I be going about this a different way?