BIND : DNS over HTTPS : Server Settings2023/04/24 |
Configure DNS over HTTPS Server on BIND.
|
|
[1] | |
[2] | Configure BIND. |
[root@dlp ~]#
openssl dhparam -out /var/named/dhparam.pem 3072 [root@dlp ~]# cp /etc/letsencrypt/live/dlp.srv.world/{fullchain.pem,privkey.pem} /var/named/ [root@dlp ~]# chown named:named /var/named/{fullchain.pem,privkey.pem,dhparam.pem}
[root@dlp ~]#
vi /etc/named.conf # add settings for certificate tls local-tls { key-file "/var/named/privkey.pem"; cert-file "/var/named/fullchain.pem"; dhparam-file "/var/named/dhparam.pem"; ciphers "HIGH:!kRSA:!aNULL:!eNULL:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!SHA1:!SHA256:!SHA384"; prefer-server-ciphers yes; session-tickets no; }; http local { endpoints { "/dns-query"; }; }; options { # change like follows listen-on tls local-tls http local { any; }; listen-on-v6 tls local-tls http local { any; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; ..... .....[root@dlp ~]# systemctl restart named |
[3] | If SELinux is enabled, change policy. |
[root@dlp ~]# setsebool -P named_tcp_bind_http_port on |
[4] | If Firewalld is running, allow service ports. |
[root@dlp ~]# firewall-cmd --add-service={http,https} success [root@dlp ~]# firewall-cmd --runtime-to-permanent success |
[5] | Verify Name Resolution with HTTPS on localhost. |
[root@dlp ~]# dig +https @127.0.0.1 dlp.srv.world. ; <<>> DiG 9.18.13 <<>> +https @127.0.0.1 dlp.srv.world. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32389 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: 15802e54be3be6f8010000006445e1d1905f9fa45ab338b9 (good) ;; QUESTION SECTION: ;dlp.srv.world. IN A ;; ANSWER SECTION: dlp.srv.world. 86400 IN A 10.0.0.30 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#443(127.0.0.1) (HTTPS) ;; WHEN: Mon Apr 24 10:56:33 JST 2023 ;; MSG SIZE rcvd: 86 |
Sponsored Link |