网站的服务器可以理解为一台比较特殊(音chu)的电脑。网站服务器有一个固定的IP地址接入互联网。
上网的时候你输入的是网站的domain,你的浏览器将去这个地址的请求发给域名服务器(domain name server,即DNS服务器)。DNS服务器可以根据你的浏览器请求的域名找到你需要访问的IP地址。获得IP之后,服务器将该网页对应的文件获取并传输给你。
为了完成该步骤,DNS服务器至少要知道你的IP地址和网站的IP地址。VPN可以为你的IP提供一层掩护,但DNS记录到你的VPN所用的IP地址经常访问也是一件比较危险的事情——对于国内VPN,可以直接要求VPN提供对应的代理记录,对于国外VPN,可以通过交易记录判断是谁在访问。
DNS服务器如果存储或者泄露服务器日志文件,你的信息很容易暴露。
除了TOR之外,还有一种加强保密的办法就是为你的浏览器指定一个DNS服务器的IP地址。据我所知Windows系统的DNS默认选项是随机分配,那么很可能掉进不保密的DNS里。
不同企业提供了很多安全的DNS服务器地址和使用方案,这里仅仅搬运一个Cloud flare提供的,其他方案的可以自行搜索,据我能查到的有十几种,但可信程度请自行判断。
CF提供的地址如下:
MacOS:
Open System Preferences.
Search for DNS Servers and select it from the dropdown.
Click the + button to add a DNS Server and enter 1.1.1.1
Click + again and enter 1.0.0.1 (This is for redundancy.)
Click + again and enter 2606:4700:4700::1111 (This is for redundancy.)
Click + again and enter 2606:4700:4700::1001 (This is for redundancy.)
Click Ok, then click Apply.
Windows:
Click on the Start menu, then click on Control Panel.
Click on Network and Internet.
Click on Change Adapter Settings.
Right click on the Wi-Fi network you are connected to, then click Properties.
Select Internet Protocol Version 4 (or Version 6 if desired).
Click Properties.
Write down any existing DNS server entries for future reference.
Click Use The Following DNS Server Addresses.
Replace those addresses with the 1.1.1.1 DNS addresses:
For IPv4: 1.1.1.1 and 1.0.0.1
For IPv6: 2606:4700:4700::1111 and 2606:4700:4700::1001
Click OK, then Close.
Restart your browser.
Linux:
Click the Applications icon on the left menu bar.
Click Settings, then Network.
Find your internet connection on the right pane, then click the gear icon.
Click the IPv4 or IPv6 tab to view your DNS settings.
Set the “Automatic” toggle on the DNS entry to Off.
Provide the 1.1.1.1 DNS addresses in the DNS entries field:
For IPv4: 1.1.1.1 and 1.0.0.1
For IPv6: 2606:4700:4700::1111,2606:4700:4700::1001
Click Apply, then restart your browser.