Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

01 June 2025

Get upstream DNS provider

To get the IP address of the server that is making the final DNS request:

nslookup whoami.akamai.net

or

dig whoami.akamai.net

Thanks, Barmar.

15 April 2022

Get external IP address via command line

nslookup:

nslookup myip.opendns.com resolver1.opendns.com

PowerShell:

(Invoke-WebRequest -uri http://ifconfig.me/ip).Content

Invoke via Command Prompt:

PowerShell -Command "(Invoke-WebRequest -uri http://ifconfig.me/ip).Content"

04 December 2021

Update BIND root hints file

Use Wget to download an update the BIND root hints:

wget ftp://ftp.internic.net/domain/named.cache -O db.root

17 July 2021

Change DNS settings from command line

Get the list of interface names:

netsh interface ip show config

Change interface named "Ethernet" to use DHCP for DNS:

netsh interface ipv4 set dnsservers name="Ethernet" source=dhcp

Set primary and secondary DNS servers for interface named "Ethernet":

netsh interface ip set dns "Ethernet" static 192.168.0.50
netsh interface ip add dns "Ethernet" 192.168.0.51 index=2

Delete a DNS server from interface "Ethernet":

netsh interface ip delete dnsserver "Ethernet" 192.168.0.51