How are dev servers for testing working and available outside of VPN?

HOW TO -️ October 18, 2021

I'm a web developer and at work we have different servers (we call them stands) for testing our deployed app.

In order to deploy our app we connect via ssh to one certain server and start a process in pm2 usually naming those like b2-dev-app or b1-dev-app the b part is defined in some list and there are a lot of possible names. Then it's available from a predefined port

We can access our apps from the browser or postman and the link to the app is something like

The question is how does this work?

From my networking knowledge, I assume that if it's available even without our company VPN all those names are in the global DNS but the server is just one and all those domains have the same IP (checked using some online IP checkers) which is something I haven't seen yet. If that help I'm pretty sure the app is served by nginx serving more as reverse proxy and there is also docker.

I tried to ask my coworkers but since it's out of my scope of work I'm not told a thing, don't have enough access to this information


_Then it's available from a predefined port._ - Available from the internal company network or from the outside? _All those domains have the same IP_ - Again, it depends on where are you trying to resolve those domain names from. Your company can have an internal DNS server responding something different (e.g. internal network address) than will be responded from the outside. And did you ever heard about the "wildcard DNS record"? Google this term. @IvanShatsky basically it's available from outside I can request those servers even from a device that uses WiFi which is not connected in any way with VPN. The thing also is that all those servers have the same IP address if I trace it the only difference is sub domain and what app is served Then most probably it is a wildcard DNS record \* pointing to the dev server where nginx select an upstream to pass the request according to the Host HTTP request header (e.g. Host: or request port number (or both), see How nginx processes a request documentation page.