Posted in Teknologi

Pengaturan DNSCrypt Di Manjaro

Menggunakan DNSCrypt di Ubuntu dan turunannya sangat mudah. Tinggal unduh dan jalankan dnscrypt-autoinstall, otomatis DNSCrypt sudah bisa dipakai. Tidak perlu melakukan pengaturan. Ini karena DNS cache yang dipakai Ubuntu, dnsmasq menggunakan 127.0.1.1 dan DNSCrypt menggunakan 127.0.0.1.

Berbeda dengan dnsmasq yang ada di Manjaro menggunakan 127.0.0.1. Harus ada pengaturan lagi sehingga dnsmasq dan DNSCrypt tidak bentrok. Jadi nanti DNSCrypt menggunakan 127.0.0.2.

Cara pengaturannya mirip dengan yang ada di situs Memo-Linux.com. Karena gue menggunakan dnscrypt-autoinstall, beberapa langkah tidak perlu dilakukan.

Pengaturan DNSCrypt.

sudo leafpad /etc/conf.d/dnscrypt-config

Ubah isi berkasnya menjadi seperti ini. Bagian lainnya biarkan saja.

DNSCRYPT_LOCALIP=127.0.0.2
DNSCRYPT_LOCALPORT=53
DNSCRYPT_RESOLVERPORT=443

Pengaturan dnsmasq.

Lakukan backup berkas konfigurasi dnsmasq.
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.old

Lalu buat konfigurasi baru.
sudo leafpad /etc/dnsmasq.conf

Dan copas isi dibawah ini kedalam berkas tadi.
# ne pa prendre en compte /etc/hosts.
no-hosts
# Do not go into the background at startup but otherwise run as
# normal.
keep-in-foreground

# Do not provide DHCP or TFTP on the loopback interface.
no-dhcp-interface=lo

# Only listen on the loopback interface.
listen-address=127.0.0.1

# Only bind to interfaces dnsmasq is listening on.
bind-interfaces

# Never forward addresses in the non-routed address spaces.
bogus-priv

# Don’t read /etc/resolv.conf.
no-resolv

# Reject (and log) addresses from upstream nameservers which are in
# the private IP ranges. This blocks an attack where a browser behind
# a firewall is used to probe machines on the local network.
stop-dns-rebind

# Exempt 127.0.0.0/8 from rebinding checks. This address range is
# returned by realtime black hole servers, so blocking it may disable
# these services.
rebind-localhost-ok

# Never forward plain names (without a dot or domain part).
domain-needed

# Upstream server is dnscrypt-proxy on local machine.
server=127.0.0.2
# Set the cache size here. If you don’t use spam blocking add-ons such
# Adblock Plus or Ghostery, you may want to increase this value as you
# will be resolving more domain names.
cache-size=1000

# Pass through DNSSEC validation results from dnscrypt-proxy.
proxy-dnssec

Langkah terakhir, memasukkan DNS 127.0.0.1 kedalam jaringan yang dipakai didalam network manager. Kalau menggunakan wifi, masukan alamat tersebut kedalam DNS wifi. Begitu juga kalau menggunakan jaringan kabel LAN.

Network Manager

Seharusnya DNSCrypt sudah bisa berjalan. Semoga berhasil.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s