domain local sederhana dengan /etc/hosts#
- check hostname atau ip address komputer local anda
1
2
3
4
5
| $ hostname -I
192.168.4.9
$ ip -c a
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.4.9/24 brd 192.168.4.255 scope global dynamic enp0s3
|
- tambahkan ip address anda dengan nama domain tertentu. semisal ainun.local
1
2
3
4
5
6
7
8
9
10
11
| $ sudo nano /etc/hosts
127.0.0.1 localhost
127.0.1.1 aal-VirtualBox
192.168.4.9 ainun.local
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
|
untuk menyimpan file menggunakan nano, tekan tombol CTRL + O
- check website domain ainun.local
1
2
| $ curl ainun.local
hai, ini adalah halaman website ainun.local
|
Membuat DNS Server menggunakan Bing9 (live)#
References: