title: Redirect external http connection within internal network
body: <p><strong>Network structure</strong><br/>
  <a href="https://i.stack.imgur.com/imMl5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/imMl5.png" alt="enter image description here"></a></p>
  
  <p>When a user connects from the internet, he gets always forwarded to container A.</p>
  
  <p>The containers all contain asp.net core mvc applications.</p>
  
  <p><strong>Problem</strong> <br/>
  I want, based on a decision which happens within container A, to be able to redirect the client to container B or container C. These containers run on ports 5001 and 5002 which aren't published to the internet.</p>
  
  <p><strong>What I tried</strong> <br/></p>
  
  <ul>
  <li>Different combinations of the asp.net <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.redirect?view=aspnetcore-3.0" rel="nofollow noreferrer">Redirect</a> function</li>
  <li>The nginx upstram and proxy functionality (primary in a setup like <a href="http://nginx.org/en/docs/http/load_balancing.html" rel="nofollow noreferrer">this</a>)</li>
  </ul>
  
  <p>I tried to find some pass through functionality for asp.net core but couldn't find any.</p>