BIND : DNS over HTTPS : Server Settings2024/11/01 |
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 @localhost dlp.srv.world. ; <<>> DiG 9.18.30 <<>> +https @localhost dlp.srv.world. ; (2 servers found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55202 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: d1eb4db75eca7bd3010000006724353bcb1a3ecf983fbffc (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: ::1#443(localhost) (HTTPS) ;; WHEN: Fri Nov 01 10:56:11 JST 2024 ;; MSG SIZE rcvd: 86 |
Sponsored Link |