You are asking for a general tutorial in name resolution which has nothing to do with Raspberry Pi. It is a general networking issue and I can only give an overview where you can look for more details.
At the beginning of the internet there was a simple file /etc/hosts used that contained all ip address to name mappings on every device. It is obviously that ...
There are several considerations here. The straightforward way is to log what the DNS forwarding (you've probably enabled) in your pi does. Typically, this will be a service such as dnsmasq, depending on how you set up the hotspot functionality of the pi. However, that will only tell you which URLs your children where browsing, and could include a lot of ...
sudo nano /etc/dnsmasq.conf
My internet is connected via eth0 then theres a vpn connection turned on
static ip_address=192.168.1.80/24 # Static ip for your rpi
static routers=192.168.1.254 # your Routers ip
static domain_name_servers=188.8.131.52 # Dns Cloudfare Server
interface=wlan0 # Use interface wlan0
Both mypi4.local , traefik.mypi4.local and grafana.mypi4.local is a FQDN (Fully Quallified Domain Name).
See under example, what a FQDN consist of : https://en.wikipedia.org/wiki/Fully_qualified_domain_name
You have to add to either a local DNS server or a host file for traefik.mypi4.local and grafana.mypi4.local to the machine you are testing from.
But I ...
There are mainly three services used for name resolution in a network, in particular together with MS Window$:
DNS (Domain Name Service) the main name service all over the world, supported by any internet provider. It resolve hierarchical organized names like raspberrypi.stackexchange.com.
mDNS (multicast DNS) an auto configuring name resolution service, ...
Hostname has nothing to do with Apache2,
Apache listen to what is coming in to the IP address that it has on its interface.
Depending on the http(s) request it send the request to the correct virtual host in apache2.
And the key value is ServerName, see example below and if you omit the ServerName it will be the same as wildcard.
The first virtual host is ...
If you want to go back to the previous settings, you'll have to restore the router settings that you have changed. Somewhere in your router there should be an option to set the DNS servers, you will have to find that. In my router, I have set the DNS server addresses to my two Raspberry Pi Zero's with PiHole on it. If I don't want that anymore, I set the DNS ...
You can try to use systemd-networkd to do all tasks without additional helper programs. You will find an example at Setting up a Raspberry Pi as an access point - the easy way with a link on section General Setup to an explanation how systemd-networkd works. I hope you can follow then the example until the section Setting up a stand alone access point. That ...
If you just want to resolve a few LAN names locally (that is, on the Pi itself), just add those names to /etc/hosts, e.g.:
If you want to run an actual DNS server, you could start by trying out systemd-resolved, which can be configured by editing /etc/systemd/resolved.conf. Depending on your needs, this ...
You have accepted to use dnsmasq as additional DNS-server together with the built-in DNS-server of systemd-networkd that you enabled with option DHCPServer = yes in /etc/systemd/network/10-wlan0.network.
You must not have two DHCP-server running on one network!
It is out of specification and may confuse your network with mixed up ip addresses.
You must ...
First you have to install a DNS server program on the Pi0W. Its ip address doesn't matter. It doesn't have anything to do with the router. You only have to ensure that its ip address is given to any device on the local network, either by manual setup or by the DHCP server.
It depends what you want to have. If you do not need to manage your own private DNS ...
Hostname is global. You can't have two names at the same time.
The host name is (user) set on /etc/hostname and also /etc/hosts (with localhost as alias).
The current active name is stored at kernel level on /proc/sys/kernel/hostname.
You can force your dhclient to publish a different name editing /etc/dhcp/dhclient.conf and adding the following:
OK, I got there in the end. I added the following to /etc/systemd/resolved.conf (as opposed to /etc/resolv.conf as I was previously)
FallbackDNS=184.108.40.206 220.127.116.11 18.104.22.168 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
.bashrc is NOT intended to run scripts. It DOES NOT run on boot!
It is run each time a non-login interactive shell is started and is used to configure the shell.
~/.bashrc: executed by bash(1) for non-login shells.
See rc.local although the ONLY reliable method is systemd
That's a big project what you try to implement. This sort of questions does not fit very well to the format of this Q&A. You should split it in different detailed single questions. But I will try to give some general ideas to your project.
You are looking for encapsulating scripts and helper programs in the hope they will simplify setup. This may be ...
I will explain in short how a DHCP server works together with a DNS server to show what is possible for your problem. A network client requests an ip address from the DHCP server with its network name. So the DHCP server knows name and ip address of the client. It gives this information with DNS update records to the DNS server, but it must know what DNS ...
I don't know if the issue that I had is identical to your issue, but I was struggling with similar issues whenever a sudo call was made. I would get a message stating:
sudo: unable to resolve host *myhostname*. Temporary failure in name resolution
Turns out that even though I had changed the hostname of my device using raspi-config, the hosts file still had ...
A Correct Way to Specify a DNS Server when Using DHCP:
This answer provides one correct way to override the DNS server(s) obtained by dhcpcd through the DHCP process. Here's another way (REF: dhcpcd documentation):
Create a file named /etc/resolv.conf.head. List your preferred DNS servers here using the same format as in /etc/resolv.conf. dhcpcd will ...
The correct way to set DNS servers is in /etc/dhcpcd.conf. This will override the value supplied by the DHCP server, without interfering with other DHCP functions. Look for a line that looks like this (create it if it doesn't exist):
static domain_name_servers=22.214.171.124 126.96.36.199 188.8.131.52
Separate multiple IP addresses with a single space ( ).
You can verify ...
Open /etc/dhcp/dhclient.conf and input a line starting with supersede. This line makes sure that only the supplied list of values for domain-name-servers on it's right will be written inside /etc/resolv.conf when writing event happens.
supersede domain-name-servers 127.0.0.1, ::1;