Mobile app version of vmapp.org
Login or Join
Gretchen104

: How to access a local webserver internally and externally with the same URL Alright, I've been trying to find an answer for a long time now. I found documentations on how to access a webserver

@Gretchen104

Posted in: #Dns #Webserver

Alright, I've been trying to find an answer for a long time now. I found documentations on how to access a webserver internaly and externaly, but here's my problem.

By the way, all websites names and IP adress are not real ;)

I've got a webserver hosting a website, let's say portal.com. I've got a website on a webhosting website too, called school.com. On school.com, there's a link to access portal.com, but the link looks like that :

For local access : 192.168.X.X/portal/...
For public access : 201.43.X.X/portal/...

the domain name school.com is registered with the web hosting company, and they programmed something so that when people write portal.school.com, they access portal.com, whether they are on our network or at home.

It worked fine on web browsers, but we started using an app to access portal.com and the way it was configured does'nt work. I'm not sure how they configured it, but I can recall they wrote a command line that would do this : if IP_adress is similar for 192.168.X.X, do that and if it's something like 201.45.X.X, do that).

With everything I read, I'm now more lost than I was before. I saw documentation about DNS split or NAT reflection and other stuff like that...

I really need help.

Thanks!

Max

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen354

Easiest way to achieve what you are wanting to achieve is to run your own DNS server on your network and have a zone file for your domain name in it. In that way...

domain.com (public dns)
www - A - 201.45.X.X

domain.com (internal dns)
www - A - 192.168.X.X

I have set this up numerous times in the past and not just with web servers but also with Microsoft exchange servers and application servers so that regardless of if you connected from the local network or from the internet you would be connected to the same server. This is by far the easiest way to manage, especially if you run a Windows network, in which case you can use the DNS server role built into Windows Server 2003+ and if you run a Linux network you can use BIND.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme