Answer the question
In order to leave comments, you need to log in
How to force to see the site by domain in the local network?
1. There is a dedicated IP for the Internet and the Internet comes to D-link dir-615.
2. There are several computers on the local network, as well as a small server with ubuntu server 12.04 on board.
3. The router distributes IP (DHCP) to everyone, and assigns a permanent one to the server.
4. I bought a domain and put it on Yandex DNS hosting, and also indicated the "A" record on a dedicated IP for the Internet.
5. In the router, I enabled DMZ for the local server, and a firewall that projects the 80th port to the local server.
6. Outside the local network, when accessing the domain, we get to the server and see the site, but from the local network, when entering the domain, we do not get to the local server.
7. Naturally, if you drive a domain name into the host on the local ip of the server, then everything works, but how can this be done automatically?
I think that you need to raise the DNS on the local server and somehow connect it with the router's DHCP...!?
Answer the question
In order to leave comments, you need to log in
On a small server, you raise dnsmasq
https://help.ubuntu.com/community/Dnsmasq
in the dnsmasq config, you need to set the address for your domain
where web-server-ip is the internal IP of your web server
. Then you look for where the DHCP server settings on the router are changed. Usually there is an opportunity to set the DNS server address, respectively, you change this address to the IP of your small server where dnsmasq is already up.
If the DHCP server is not configured normally on the router, you can turn off DHCP on the router and use the same dnsmasq to perform DHCP server functions
- https://wiki.debian.org/HowTo/dnsmasq
setting path.
Gee! A person does not know how to deploy a domain name on the network, but he is told to keep the bind. You have several options:
Buy another domain name and already bind to internal ip
Add a third-level domain name like ttk.tvoydomen.ru and deploy it inside.
Put the same Mikrotik ... or any other gateway that will give you the opportunity to bind domain name requests to an internal ip on the network.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question