-
Notifications
You must be signed in to change notification settings - Fork 1
Use domain on Linux
Aron Heesakkers edited this page Jun 10, 2021
·
1 revision
How to add a DNS to Linux Ubuntu 20.04 server.
Login to your server.
IP address is an example. Use your own IP addresss!
Change the file hostname to use your DNS.
# /etc/hostname
ubuntu->
# /etc/hostname
fipost.nlThen run:
sudo hostname $(cat /etc/hostname)Source:
Change the resolver.
vim /etc/systemd/resolved.configAdd domain fipost.nl
Result:
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
domain fipost.nl
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=yes
... 127.0.0.1 hostname.domain.com hostname localhost
# /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntuTo
# /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu