Edit /etc/host and keep changes permanently
-
- OMV 5.x
- gett
-
-
gett
Changed the title of the thread from “Edit /etc/host” to “Edit /etc/host and keep changes permanently”. -
-
Look here
Thank you for answer, but that not help me. I have a valid DNS address configured, OMV works fine. I just want to to map domain names to IP addresses in /etc/hosts. For example:
192.168.10.10:8765 heimdall.mydomain.com
-
-
Are you using dnsmasq? If so just create another hosts file. Save it where ever you want.
Go to this portion of your dnsmasq.conf and add the “addn” line.
Code# or if you want it to read another file, as well as /etc/hosts use this. addn-hosts=/srv/dev-disk-by-label-HomeDrive/"config files”/dnsmasq/hosts2
Obviously change the path to where you keep yours and the file name. I called mine hosts2.
Here is how my hosts2 file looks
Code
Display More# # hosts This file describes a number of hostname-to-address # mappings for the TCP/IP subsystem. It is mostly # used at boot time, when no name servers are running. # On small systems, this file can be used instead of a # "named" name server. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname # 192.168.1.29 mydomain.duckdns.org. jellyfin.mydomain.duckdns.org. omv.mydomain.duckdns.org. nas.mydomain.duckdns.org # special IPv6 addresses #use 'sudo killall -9 dnsmasq' to kill process #use 'sudo dnsmasq' to start process
Hopefully the formatting comes out correctly. Now mydomain resolves to my Pi.
-
is not a valid hostname
Thanks, I type in hurry.
I use PiHole docker container
Unfortunately, my provider's modem don't allow me to change DNS in settings, so I'm stuck with DNS from my provider. As far as I understand, I have to change DNS in modem for using Pi hole
-
Are you using dnsmasq?
No I don't, but thank you for mentioning it, I'll try.
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!