Help us understand the problem. What is going on with this article?

archでdns-over-httpsを設定してみたお話

archでdns-over-httpsを設定してみたお話

普段dnsmasqは動かしてるので
そろそろ使ってみようと思ってとりあえずやってみた

必要なパッケージをインストール

今回はdns-over-httpsを使用

$ sudo pacman -S dns-over-https
resolving dependencies...
looking for conflicting packages...

Packages (1) dns-over-https-2.2.1-1
...

以下設定とか

設定としてはとりあえず最小限の変更として、listenだけ調整してやりました

何も使ってない環境は調整不要のはずなのでお好みで

$ /etc/dns-over-https/doh-client.conf
# DNS listen port
listen = [
      #"127.0.0.1:53",
      "127.0.0.1:5380",

systemdへ普通にスタート登録して起動

systemctl enable doh-client
systemctl start doh-client

dnsmasqを使っているので、設定に次の項目を入れてやりました。

# no reading resolv.conf
no-resolv

# to local doh-client
server=127.0.0.1#5380

あとはdoh-clientを参照するように設定で完了

$ /etc/resolve.conf
nameserver 127.0.0.1

使用確認について

これで暗号化されてDNS参照ができるようになりました。

一応digってみてもなんの変化も有りませんが、少しはセキュアになってます。

$ dig @127.0.0.1 www.google.com

; <<>> DiG 9.14.7 <<>> @127.0.0.1 www.google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53182
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
; PAD (65 bytes)
;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         140     IN      A       172.217.26.4

;; Query time: 10 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)

気になる場合は doh-client.conf に verbose=true を追加
journald等でログを眺めてやるとニヤニヤできます。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした