域名解析

域名解析失败:必须添加nameserver到/etc/resolv.conf

echo "nameserver 114.114.114.114" >> /etc/resolv.conf
echo "nameserver 1.2.4.8" >> /etc/resolv.conf
cat /etc/resolv.conf

每次网络变化都需要重新添加nameserver,并且连接速度极慢

image-20210715101546512

提高虚拟机网速

配置/etc/netplan/01-network-manager-all.yaml文件

# Let NetworkManager manage all devices on this systemnetwork:
network:
  ethernets:
    eth0 : #配置的网卡的名称
      addresses: [192.168.0.103/24]    #配置的静态ip地址和掩码
      dhcp4: no    #关闭DHCP,如果需要打开DHCP则写yes
      optional: true
      gateway4: 192.168.0.1    #网关地址
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]    #DNS服务器地址,多个DNS服务器地址需要用英文逗号分隔开
  version: 2
  renderer: networkd    #指定后端采用systemd-networkd或者Network Manager,可不填写则默认使用systemd-workd

并使用service netplan restart,速度仍然很慢

vpn连接

启动OpenVPN:

cd /home/sunie/sensetime/
wget https://img2.sobot.com/console/527a9d45c6b94a85b017e0687c4c8b8f/kb/file/d09aa1ad57284b13bb6280ce322613d3.tar | tar -xvf
cd /home/sunie/sensetime/openvpn-install-18.04/
sh install_openvpn_18_04_local.sh
sudo apt install -f

翻墙

image-20210715102009764image-20210715102102420

已经申请VPN策略,连接上公司VPN并且配置代理,依然无法访问google.


无法解决!