Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nano /etc/ssh/sshd_config [enter]
- # edit PermitRootLogin without-password to
- PermitRootLogin yes
- apt-get update [enter]
- service ssh restart
- apt-get install devscripts build-essential openssl libssl-dev fakeroot libcppunit-dev libsasl2-dev cdbs ccze libfile-readbackwards-perl libcap2 libcap-dev libcap2-dev -y [enter]
- apt-get install sysv-rc-conf -y [enter]
- # Install aplikasi DNS server bind9. 192.168.2.222 adalah ip server yang menuju client.
- apt install bind9 dnsutils
- # Masuk ke direktori konfigurasi bind dan buka file konfigurasi named.conf.options.
- cd /etc/bind
- nano named.conf.options
- # Tambah dan ubah menjadi seperti di bawah ini.
- listen-on-v6 { none; };
- listen-on port 53 { localhost; 192.168.2.0/24; };
- allow-query { localhost; 192.168.2.0/24; };
- forwarders { 8.8.8.8; 8.8.4.4; 1.1.1.1; };
- recursion yes;
- # Buka file konfigurasi named.conf.local.
- nano named.conf.local
- # Tambahkan di baris paling bawah.
- zone "proxy.local.net" {
- type master;
- file "/etc/bind/forward.proxy.local.net";
- };
- zone "2.168.192.in-addr.arpa" {
- type master;
- file "/etc/bind/reverse.proxy.local.net";
- };
- # Selanjutnya membuat file konfigurasi forward.proxy.local.net.
- cp db.local forward.proxy.local.net
- nano forward.proxy.local.net
- # Ubah isinya menjadi seperti di bawah ini.
- ;
- ; BIND data file for local loopback interface
- ;
- $TTL 604800
- @ IN SOA proxy.local.net. root.proxy.local.net. (
- 2 ; Serial
- 604800 ; Refresh
- 86400 ; Retry
- 2419200 ; Expire
- 604800 ) ; Negative Cache TTL
- ;
- @ IN NS ns1.proxy.local.net.
- @ IN NS ns2.proxy.local.net.
- @ IN A 192.168.2.222
- ns1 IN A 192.168.2.222
- ns2 IN A 192.168.2.222
- www IN CNAME proxy.local.net.
- Selanjutnya file konfigurasi reverse.proxy.local.net.
- cp db.127 reverse.proxy.local.net
- nano reverse.proxy.local.net
- Ubah menjadi seperti di bawah ini.
- ;
- ; BIND reverse data file for local loopback interface
- ;
- $TTL 604800
- @ IN SOA proxy.local.net. root.proxy.local.net. (
- 1 ; Serial
- 604800 ; Refresh
- 86400 ; Retry
- 2419200 ; Expire
- 604800 ) ; Negative Cache TTL
- ;
- IN NS ns1.proxy.local.net.
- IN NS ns2.proxy.local.net.
- ns1 IN A 192.168.2.222
- ns2 IN A 192.168.2.222
- @ IN A 192.168.2.222
- 1 IN PTR proxy.local.net.
- Restart service bind9, cek statusnya beserta file konfigurasi named.conf.
- systemctl restart bind9
- systemctl status bind9
- named-checkconf
- Tambahkan nama domain dan IP address server pada file konfigurasi DNS resolver. File ini sebelumnya sudah diisi dengan IP address dari DNS server Google dan Cloudflare.
- nano /etc/resolv.conf
- Isinya menjadi.
- search proxy.local.net
- nameserver 192.168.2.222
- nameserver 8.8.4.4
- nameserver 8.8.8.8
- nameserver 1.1.1.1
- Uji konfigurasi DNS server dengan menjalankan perintah nslookup atau dig.
Add Comment
Please, Sign In to add comment