Score:-1

Is it possible to resolve a public domain in local network?

cn flag

Is it possible to resolve a public domain (ex: http://example.com/ ) in local network ?

The local network has a server which hosted a website with domain http://example.com/. The local network is connected to internet

If I enter http://example.com/ from browser, then the request should go to local DNS and fetch my web page from my server instead of public DNS and fetch public website

djdomi avatar
za flag
did you ever heard about the hosts file?
cn flag
Nothing to do you running your own DNS server (e.g. dnsmasq)
Hiren Parghi avatar
in flag
Add the following host entries to your host file and you will be able to run it in your local system. A - IP address where website actually pointing
krishna avatar
cn flag
Ya, I configured dnsmasq as local dns and hosts files, but from devices the clients hitting public domain instead of local domain. some clients devices hitting local domain
Score:2
za flag

Usually every decently configured network has its own DNS server, which handles all of the DNS queried for attached subnet. You should configure this zone there.

So - yup, thats a common practice.

krishna avatar
cn flag
hi @drookie , I already configured, but the system has internet connection, so it is hitting public domain, when internet removed then it is hitting local domain. I want to hit always local domain irrespective of internet connection
drookie avatar
za flag
The trick is simple - your in-LAN machnes have to have the internal DNS as their only resolver. And this internal DNS should resolve internal resources to the internal IPs.
krishna avatar
cn flag
Ya @drookie, your are right but when I connected to Internet then its hitting public domain. I want to use private domain which already exists in public. Without internet connection its working fine, but I want along with Internet connection
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.