HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

NAT'd server


Hello all,

I have LAN-based server with a DNS name different from it’s Internet DNS name. It’s NAT’d on the Internet using a firewall (it’s in a DMZ).

When the portal and other pages are served up on the Internet the absolute names (servername/page) appear in the pages - since those items (generally images) can’t be located on the Internet they don’t appear on the pages.

Does anyone have any experience with this kind of setup - I would like to use both host names as both the internal LAN name and Internet name are accessed by users.


There’s not a simple way around this, but here’s a few ideas.

  1. You could dynamically set the cHOST variable based on where the user is coming from. So if the IP of the visitor is on your internal LAN then set the cHOST variable with the lan friendly name. If not, set the cHOST variable with the internet domain.

  2. You could setup 2 different installations both pointing to the same database. One which is setup for local and the other for external. As long as their pointing to the same DB it should work fine since HelpSpot stores all data in the database.


Could you let me know how to set the cHOST variable dynamically?

I’m now testing some DNS tricks to see if I can get a single install to work in/out.

One of the issues is port forwarding, given the absolute names I need to be running the same ports inside as outside instead of being able to translate ports.


Well I’m not a “network guy” really so here’s a general example based on the incoming IP. You can probably modify this for your needs.

define(‘cHOST’, (getenv(“REMOTE_ADDR”) == ‘’ ? ‘’ : ‘’) );