Internal & External hostname


#1

I was wondering if somebody could help / find a solution for my case. I want to have 1 name for my weblink for inside or outside traffic. And behind my public IP, there are different (web)services. This way, all users don’t have to remember where they are (inside or outside the network).

For most tools (fe wordpress, joomla, zoneminder…) this works fine with a combination of subdomains and DNS resolving. On the external world, I use a subdomain forward to a specific port that’s been translated afterwards, and on the internal side, I use DNS resolving.

With Discourse, it works almost perfect. Discourse is running fine, except for images and maillinks on the outside.

  • External: discourse.mydom .org > lan.mydom .org:11113 > 192.168.0.3:80
  • Internal: discourse.mydom .org > 192.168.0.3

So when I use it external, i’m getting following issue:

  • normal usuage: http:/ /discourse.mydom .org > (directly translated to http:/ /lan.mydom .org:11113)
  • image link: http:/ /discourse.mydom.org/upload…

So in the above case, if http:/ /discourse.mydom.org/upload… would be translate to http:/ /lan.mydom. org:11113/upload… it would work.
I understand that this is something to do with the hostname. But if I want to use a short link (=without the port in it), i don’t have any possibility to use port 80, what I want to avoid since 80 is default for ‘global’ intranetsite.

I’ve played with A-records, SRV-records… But couldn’t get it to work.
Any thoughs, ideas…?

A scheme to visualize it a bit: