Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save asrarak/1630ba84893c4a94744746dd23b8b724 to your computer and use it in GitHub Desktop.
Save asrarak/1630ba84893c4a94744746dd23b8b724 to your computer and use it in GitHub Desktop.
Bypass dnscrypt-proxy for network captive portal when using pihole

English

  1. Login to your pihole using SSH
  2. Create a new configuration file in /etc/dnsmasq.d/ folder (use 00- prefix, for example 00-wifiid.conf
  3. Insert strict-order and your captive portal's DNS server in the new file, for example when using this on wifi.id networks:
strict-order  
server=/wifi.id/118.98.44.100  
server=/iwifi.id/118.98.44.100
server=/connectivitycheck.gstatic.com/118.98.44.100
server=/msftconnecttest.com/118.98.44.100
  1. Reboot your pihole (either with sudo pihole restart or sudo restart)
  2. You should be able to receive the captive portal login notification now while still using dnscrypt-proxy for other things. If not, restart your phone/laptop's wifi.

Bahasa Indonesia

  1. Login ke pihole anda menggunakan SSH
  2. Buat berkas konfigurasi baru di folder /etc/dnsmasq.d/ (gunakan 00- sebagai awalan, misalnya 00-wifiid.conf):
    sudo editor /etc/dnsmasq.d/00-wifiid.conf
  3. Masukkan parameter strict-order dan DNS server captive portal jaringan anda (saya kasih contoh di sini untuk jaringan wifi.id) di file tadi:
strict-order  
server=/wifi.id/118.98.44.100  
server=/iwifi.id/118.98.44.100
server=/connectivitycheck.gstatic.com/118.98.44.100
server=/msftconnecttest.com/118.98.44.100
  1. Lakukan restart pada pihole (bisa lewat perintah sudo pihole restartdns atau sudo reboot)
  2. Setelah reboot, seharusnya perangkat anda akan mengeluarkan notifikasi untuk login di jaringan yang menggunakan captive portal sambil tetap menggunakan dnscrypt-proxy. Jika captive portal tidak muncul, restart wifi di handphone/laptop anda.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment