最近百度老打不开…不知道是不是武汉电信的DNS不好使了,我把DNS换成谷歌的DNS就开得蛮好…

暴怒了…电信的垃圾DNS呀!!!于是果断换成谷歌DNS…顺便也可以防止电信的DNS挟持,呵呵…

顺手写了个批处理来设置DNS…这样以后就算万一临时要换成电信的DNS,用完了也方便快速的设置回来…

因为有中文,所以记得保存文本时要保存成ANSI编码,否则处理命令全是乱码哟…

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo on

netsh interface ip set dns "本地连接" dhcp

rem Google Public DNS
netsh interface ip add dns "本地连接" 8.8.8.8
netsh interface ip add dns "本地连接" 8.8.4.4

rem OpenDNS
netsh interface ip add dns "本地连接" 208.67.222.222
netsh interface ip add dns "本地连接" 208.67.220.220

rem Norton DNS
netsh interface ip add dns "本地连接" 198.153.192.1
netsh interface ip add dns "本地连接" 198.153.194.1

rem Dnsadvantage
netsh interface ip add dns "本地连接" 156.154.70.1
netsh interface ip add dns "本地连接" 156.154.71.1

rem Comodo Secure DNS
netsh interface ip add dns "本地连接" 8.26.56.26
netsh interface ip add dns "本地连接" 8.20.247.20
netsh interface ip add dns "本地连接" 156.154.70.22

rem GTEI DNS
netsh interface ip add dns "本地连接" 4.2.2.1
netsh interface ip add dns "本地连接" 4.2.2.2
netsh interface ip add dns "本地连接" 4.2.2.3
netsh interface ip add dns "本地连接" 4.2.2.4
netsh interface ip add dns "本地连接" 4.2.2.5
netsh interface ip add dns "本地连接" 4.2.2.6

rem 武汉
netsh interface ip add dns "本地连接" 202.103.24.68
netsh interface ip add dns "本地连接" 202.103.0.117

rem OpenerDNS
netsh interface ip add dns "本地连接" 42.120.21.30
rem 114DNS
netsh interface ip add dns "本地连接" 114.114.114.114

rem 刷新DNS缓存
ipconfig /flushdns

pause