Linux 网络 - 修改DNS

很多人都不知道,DNS是互联网的基石,能够快速将域名转化为IP地址,方便我们访问网站。家里有孩子和老人,更要了解DNS的重要性,稳定的DNS服务让每一次上网都流畅无阻。使用安全的DNS,确保信息的传递更加可靠,畅享无忧的网络世界。

推荐案例云公共的DNS https://alidns.com/

IP4

1
223.5.5.5,223.6.6.6

IP6

1
2400:3200::1,2400:3200:baba::1

修改前

1
2
3
4
5
6
7
8
9
➜  ~ ping raw.githubusercontent.com -c3
PING raw.githubusercontent.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.009 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.018 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.017 ms

--- raw.githubusercontent.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2053ms
rtt min/avg/max/mdev = 0.009/0.014/0.018/0.004 ms

修改后

1
2
3
4
5
6
7
8
PING raw.githubusercontent.com (185.199.109.133) 56(84) bytes of data.
64 bytes from cdn-185-199-109-133.github.com (185.199.109.133): icmp_seq=1 ttl=128 time=120 ms
64 bytes from cdn-185-199-109-133.github.com (185.199.109.133): icmp_seq=2 ttl=128 time=121 ms
64 bytes from cdn-185-199-109-133.github.com (185.199.109.133): icmp_seq=3 ttl=128 time=121 ms

--- raw.githubusercontent.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 120.394/120.504/120.613/0.089 ms

Linux 网络 - 修改DNS
http://example.com/2024/10/20/Linux/100.修改DNS/
作者
John Doe
发布于
2024年10月20日
许可协议