How to access subdomain in for ssh tunneling for django multi-tanant app?

One of my friends has a Multi-Tenant Django app running at gitlab ci.
He’s accessing the app by ssh tunneling and has given it to an android app developer who can access API via IP address.

As a multi-tenant app every time a user is created a new subdomain is created. Suppose I created a user named usa. So, this can be accessed by usa.domainname.com.

Since we are providing the app developer an ip address. He can access the site but not the subdomains that are created dynamically.

Let’s say, we have given him the ip 172.168.0.1. He can access the main site with this IP but he cannot access usa.172.168.0.1.

When I ran the app I could access it at ‘localhost:8000’ and the subdomain at ‘usa.loclhost:8000’. But I cannot access it at ‘usa.127.0.0.1:8000’

I understand that we cannot use subdomains with IP address. Because subdomains itself has it’s own DNS.

I want the app developer to access those dynamically created subdomains via IP. Since it’s not deployed anywhere all I have to give the app developer is IP addresses.

How can I do that?

Thank you.

Source: StackOverflow