nsd: adding captive portal dns redirect

This commit is contained in:
Ludwig Behm 2024-04-20 20:50:26 +02:00
parent abcd689bc6
commit 21d585edc2
3 changed files with 29 additions and 0 deletions

View file

@ -10,6 +10,7 @@ install:
@echo setup nsd dns server @echo setup nsd dns server
install -o0 -g0 nsd/nsd.conf.d/* /etc/nsd/nsd.conf.d/ install -o0 -g0 nsd/nsd.conf.d/* /etc/nsd/nsd.conf.d/
install -o0 -g0 nsd/zones/* /etc/nsd/zones/ install -o0 -g0 nsd/zones/* /etc/nsd/zones/
systemctl restart nsd.service
@echo install nginx @echo install nginx
rm -f /etc/nginx/sites-enabled/default rm -f /etc/nginx/sites-enabled/default

View file

@ -9,3 +9,7 @@ server:
zone: zone:
name: kraut.space name: kraut.space
zonefile: kraut.space zonefile: kraut.space
zone:
name: .
zonefile: captive-portals

24
nsd/zones/captive-portals Normal file
View file

@ -0,0 +1,24 @@
$ORIGIN . ; default zone domain
$TTL 2 ; default time to live
@ IN SOA doorito.tuer.kraut.space. office.kraut.space. (
2404182124 ; serial number <yymmddHHMM>
60 ; Refresh
7200 ; Retry
60 ; Expire
60 ; Min TTL
)
IN NS doorito.tuer.kraut.space.
; Android
connectivitycheck.gstatic.com. IN A 192.168.1.1
clients3.google.com. IN A 192.168.1.1
; Firefox
detectportal.firefox.com. IN A 192.168.1.1
; macOS / iOS
captive.apple.com. IN A 192.168.1.1
; Windows
www.msftncsi.com. IN A 192.168.1.1
www.msftconnecttest.com. IN A 192.168.1.1
dns.msftncsi.com. IN A 192.168.1.1