Skip to content

Instantly share code, notes, and snippets.

@michel-pi
Created January 11, 2021 23:16
Show Gist options
  • Save michel-pi/f96b639e6300c44b02f400009b6d6a72 to your computer and use it in GitHub Desktop.
Save michel-pi/f96b639e6300c44b02f400009b6d6a72 to your computer and use it in GitHub Desktop.
set cloudflare dns server with console
@echo off
netsh interface ipv4 set dnsservers name="Ethernet" validate=no static 1.1.1.1 primary > nul
netsh interface ipv4 add dnsservers name="Ethernet" validate=no 1.0.0.1 index=2 > nul
netsh interface ipv6 set dnsservers name="Ethernet" validate=no static 2606:4700:4700::1111 primary > nul
netsh interface ipv6 add dnsservers name="Ethernet" validate=no 2606:4700:4700::1001 index=2 > nul
ipconfig /flushdns > nul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment