我尝试在 Ubuntu 9.10 上设置与 ItsHidden 的 VPN 连接。我在 VPN 配置中仔细检查了我的凭据,但我认为这不是问题。在我的系统日志中,我收到了以下消息:
Jan 11 14:38:46 NetworkManager: Starting VPN service 'org.freedesktop.NetworkManager.pptp'...
Jan 11 14:38:46 NetworkManager: VPN service 'org.freedesktop.NetworkManager.pptp' started (org.freedesktop.NetworkManager.pptp), PID 4502
Jan 11 14:38:46 NetworkManager: VPN service 'org.freedesktop.NetworkManager.pptp' just appeared, activating connections
Jan 11 14:38:46 NetworkManager: VPN plugin state changed: 1
Jan 11 14:38:46 NetworkManager: VPN plugin state changed: 3
Jan 11 14:38:46 pppd[4506]: Plugin /usr/lib/pppd/2.4.5//nm-pptp-pppd-plugin.so loaded.
Jan 11 14:38:46 NetworkManager: VPN connection 'ItsHidden' (Connect) reply received.
Jan 11 14:38:46 pppd[4506]: pppd 2.4.5 started by root, uid 0
Jan 11 14:38:46 pppd[4506]: Using interface ppp0
Jan 11 14:38:46 NetworkManager: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jan 11 14:38:46 NetworkManager: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Jan 11 14:38:46 pppd[4506]: Connect: ppp0 /dev/pts/1
Jan 11 14:39:06 pptp[4508]: nm-pptp-service-4502 fatal[get_ip_address:pptp.c:430]: gethostbyname 'vpn.itshidden.com': HOST NOT FOUND
Jan 11 14:39:06 pppd[4506]: Modem hangup
Jan 11 14:39:06 pppd[4506]: Connection terminated.
Jan 11 14:39:06 NetworkManager: VPN plugin failed: 1
Jan 11 14:39:06 NetworkManager: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jan 11 14:39:06 pppd[4506]: Exit.
Jan 11 14:39:06 NetworkManager: VPN plugin failed: 1
Jan 11 14:39:06 NetworkManager: VPN plugin failed: 1
Jan 11 14:39:06 NetworkManager: VPN plugin state changed: 6
Jan 11 14:39:06 NetworkManager: VPN plugin state change reason: 0
Jan 11 14:39:06 NetworkManager: connection_state_changed(): Could not process the request because no VPN connection was active.
Jan 11 14:39:06 NetworkManager: Policy set 'Auto eth0' (eth0) as default for routing and DNS.
Jan 11 14:39:19 NetworkManager: [1263213559.003098] ensure_killed(): waiting for vpn service pid 4502 to exit
Jan 11 14:39:19 NetworkManager: [1263213559.003289] ensure_killed(): vpn service pid 4502 cleaned up
由于 gethostbyname 失败,我猜想 NetworkManager 不知道我使用代理访问互联网。我不确定这是否是真正的问题。
您能告诉我一个让 gesthostbyname 不再失败的解决方案吗?
答案1
使用代理不会影响您执行 DNS 查找的能力。尝试运行nslookup vpn.itshidden.com
以检查这一点。您需要理清执行 DNS 查找的能力(请参阅 /etc/resolv.conf)或将 vpn.itshidden.com 添加到 /etc/hosts 并希望 IP 地址不会改变,或者只是在您的 VPN 设置中使用 vpn.itshidden.com 的 IP 地址。