Ifconfig //看网卡的参数,如ip地址
ip route
route -n
ip neigh
sudo dhclient vpn_vpn_gate_te
//对虚拟网卡分配IP地址,注意虚拟网卡名称
ip addr show vpn_vpn_gate_te
//查看虚拟网卡参数
sudo ip route add 112.144.197.37/32 via 192.168.199.1 dev eth0 //路由规则,注意VPN服务器地址
sudo ip route del default //删除默认IP路由
sudo ip route add default via 10.211.254.254 dev vpn_vpn_gate_te
//将默认路由指向虚拟网卡
ip route
route -n
ip neigh
sudo dhclient vpn_vpn_gate_te
//对虚拟网卡分配IP地址,注意虚拟网卡名称
ip addr show vpn_vpn_gate_te
//查看虚拟网卡参数
sudo ip route add 112.144.197.37/32 via 192.168.199.1 dev eth0 //路由规则,注意VPN服务器地址
sudo ip route del default //删除默认IP路由
sudo ip route add default via 10.211.254.254 dev vpn_vpn_gate_te
//将默认路由指向虚拟网卡