What is the best solution to access YT 5.2 Standalone (.exe) from inside and outside of the local network?

I am running YouTrack 5.2 on a Windows 7 Workstation/Server. I have 5 other machines on the same network that I would like to be able to use to access the installation. I would also like to be able to access it from home as well. I set up the firewalls to allow incoming requests on a specific port, and left the base url in settings set to localhost:port.

With this configuration I can access YT on the machine itself with localhost:port, or from outside the local network, like from my home office with my external ip, i.e. 174.xxx.xx.xx:port. However, I cannot access it from any of the other PCs or Macs in studio that reside on the same local network, and any notifications sent from YT use the localhost:port url causing the machine that the notification is opened and clicked on to look internally for YT and obviously fail.

What is the best solution for a use case like ours?

I don't know if it hurts or helps the matter, but I also have a WAMP server installed on the same machine. We also have a reseller account with a webhost that we can use if it helps to set up a domain that points to YT as a way to access it both internally and externally. Any help would be greatly appreciated! I have scoured the net and the forums here but haven't been able to find a solution our requirements.
Comment actions Permalink

Did try to set <server name>:port or <ip-address>:port as BaseURL?

Thank you.
Comment actions Permalink
Yes, I set <external-ip>:<port>. This makes the url in notifications sent to users work while off-site or outside of LAN. But then those notifications will not direct users inside the LAN to the installation. This also makes the YouTrack server completely unreachable by any machine on the LAN. The reason being that the LAN requests do not go through the NAT, they bypass and direct connect laterally on the LAN.

The best configuration I have found requires a certain functionality in the gateway(router, or switch) called NAT Reflection. NAT reflection will allow internal LAN connections to make requests to the Public IP through NAT which in turn creates a route to the YouTrack Server back in the LAN. With NAT reflection enabled this route remains "open" from LAN CLIENT > PUBLIC-IP > LAN SERVER.

Most Gateways do not have this functionality. The second best setup in this case would be to set a NAT rule. Once again this requires that your Gateway allows you to write custom NAT rules. You will need to write a rule that allows "masquerading". Look up "Hairpin NAT" for more information.

None of these were an option with the current Gateway for me. Currently, I am running localhost:<port> as the BaseURL. I have created a "hosts" file for all machines on the LAN except the YouTrack Server, that resolves localhost to the internal LAN ip of the YouTrack Server.

All users can access YouTrack from outside of the LAN by pointing their browsers to <external-ip>:<port>
All users on the LAN can access the YouTrack Server, and the links in notifications work when used inside the studio(aka the LAN), as long as the client has the modified hosts file.

Links in notifications point to localhost, meaning they don't work outside the LAN.

This is the best configuration for our needs that I know of right now. Ultimately I would like to have friendly domain name that can be used both in LAN, and externally from the internet to access the installation. This would make the links in notifications work both inside and outside the LAN. Not sure exactly how to get there just yet. Thinking maybe a proxy server of some sort.


Please sign in to leave a comment.