xubuntu 14.04 VPN连接无网络访问

xubuntu 14.04 VPN连接无网络访问

我正在使用“所有设置”下的“网络连接”应用程序配置并连接到 VPN 服务器,以便访问网络资源并使用 Reminna 的远程桌面。VPN 建立了连接,但我无法访问任何网络资源。

背景是这样的,我在过去几周内已经使用当前设置成功完成了此操作,唯一的变化是我搬家并收到了新的电缆调制解调器(网关设备)。我已确保此新设备没有防火墙设置,并且已配置 3389(RPD)的端口转发。我还注意到本地网络(家庭和工作)配置为 10.0.0.x,因此我将本地网络重新配置为 10.0.1.x,这样就不会太混乱。此外,当我进行故障排除并需要互联网访问时,在 IPv4 设置->路由下,我已选中“仅将此连接用于其网络上的资源”复选框。

此外,我能够连接到我的 VPN,并成功使用我的 Android 平板电脑和 Win7 计算机远程访问计算机和资源,它们与我的 xubuntu 14.04 计算机位于同一网络上。这似乎表明我的路由或 vpn 配置可能有问题。我尝试删除并从头开始重新创建我的 vpn 配置,但没有效果。我已尽力搜索网络并找到类似的问题/解决方案,但我不知所措。为了进行故障排除,我提供了 vpn 连接之前和之后的路由和 ifconfig 结果,并添加了 /var/log/syslog 输出。

任何帮助是极大的赞赏!

非 VPN 连接路由命令

:~$ route
Kernel IP routing table
Destination     Gateway     Genmask         Flags   Metric  Ref Use Iface
default         10.0.1.1    0.0.0.0         UG      0       0   0   eth0
10.0.1.0        *           255.255.255.0   U       1       0   0   eth0

VPN“连接已成功建立”

:~$ route
Kernel IP routing table
Destination     Gateway     Genmask         Flags   Metric  Ref Use Iface
default         10.0.1.1    0.0.0.0         UG      0       0   0   eth0
10.0.0.90       *           255.255.255.255 UH      0       0   0   ppp0
10.0.1.0        *           255.255.255.0   U       1       0   0   eth0
xx-xx-xx-xx-st  10.0.1.1    255.255.255.255 UGH     0       0   0   eth0
xx-xx-xx-xx-st  10.0.1.1    255.255.255.255 UGH     0       0   0   eth0

不使用 vpn 的 ifconfig 结果

:~$ ifconfig
eth0    Link encap:Ethernet  HWaddr 40:16:7e:63:62:10  
        inet addr:10.0.1.30  Bcast:10.0.1.255  Mask:255.255.255.0
        inet6 addr: <xx>:acff/64 Scope:Global
        inet6 addr: <xx>:6210/64 Scope:Global
        inet6 addr: <xx>::ca4e/128 Scope:Global
        inet6 addr: <xx>:6210/64 Scope:Link
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:608006 errors:0 dropped:0 overruns:0 frame:0
        TX packets:401539 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 
        RX bytes:586253471 (586.2 MB)  TX bytes:39736340 (39.7 MB)

lo      Link encap:Local Loopback  
        inet addr:127.0.0.1  Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING  MTU:65536  Metric:1
        RX packets:44231 errors:0 dropped:0 overruns:0 frame:0
        TX packets:44231 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0 
        RX bytes:3993104 (3.9 MB)  TX bytes:3993104 (3.9 MB)

已连接 VPN

:~$ ifconfig
eth0    Link encap:Ethernet  HWaddr 40:16:7f:01:62:10  
        inet addr:10.0.1.30  Bcast:10.0.1.255  Mask:255.255.255.0
        inet6 addr: <xx>acff/64 Scope:Global
        inet6 addr: <xx>:6210/64 Scope:Global
        inet6 addr: <xx>::ca4e/128 Scope:Global
        inet6 addr: <xx>:6210/64 Scope:Link
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:607270 errors:0 dropped:0 overruns:0 frame:0
        TX packets:400937 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 
        RX bytes:586134269 (586.1 MB)  TX bytes:39688705 (39.6 MB)

lo      Link encap:Local Loopback  
        inet addr:127.0.0.1  Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING  MTU:65536  Metric:1
        RX packets:44145 errors:0 dropped:0 overruns:0 frame:0
        TX packets:44145 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0 
        RX bytes:3985819 (3.9 MB)  TX bytes:3985819 (3.9 MB)

ppp0    Link encap:Point-to-Point Protocol  
        inet addr:10.0.0.95  P-t-P:10.0.0.90  Mask:255.255.255.255
        UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
        RX packets:19 errors:0 dropped:0 overruns:0 frame:0
        TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:3 
        RX bytes:1045 (1.0 KB)  TX bytes:126 (126.0 B)

启动 vpn 连接后,我的 var/log/syslog 文件产生以下输出。

Jul 19 16:26:15 silentone NetworkManager[704]: <info> Starting VPN service 'pptp'...
Jul 19 16:26:15 silentone NetworkManager[704]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 16132
Jul 19 16:26:15 silentone NetworkManager[704]: <info> VPN service 'pptp' appeared; activating connections
Jul 19 16:26:21 silentone NetworkManager[704]: <info> VPN plugin state changed: starting (3)
Jul 19 16:26:21 silentone NetworkManager[704]: <info> VPN connection 'SLGI-1' (Connect) reply received.
Jul 19 16:26:21 silentone pppd[16136]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Jul 19 16:26:21 silentone pppd[16136]: pppd 2.4.5 started by root, uid 0
Jul 19 16:26:21 silentone pppd[16136]: Using interface ppp0
Jul 19 16:26:21 silentone pppd[16136]: Connect: ppp0 <--> /dev/pts/3
Jul 19 16:26:21 silentone pptp[16139]: nm-pptp-service-16132 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Jul 19 16:26:21 silentone NetworkManager[704]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jul 19 16:26:21 silentone NetworkManager[704]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Jul 19 16:26:21 silentone NetworkManager[704]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Jul 19 16:26:21 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Jul 19 16:26:21 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Jul 19 16:26:21 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Jul 19 16:26:22 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Jul 19 16:26:22 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Jul 19 16:26:22 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 33436).
Jul 19 16:26:22 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_disp:pptp_ctrl.c:950]: PPTP_SET_LINK_INFO received from peer_callid 58759
Jul 19 16:26:22 silentone pptp[16155]: nm-pptp-service-16132 log[ctrlp_disp:pptp_ctrl.c:953]:   send_accm is 00000000, recv_accm is FFFFFFFF
Jul 19 16:26:22 silentone pptp[16155]: nm-pptp-service-16132 warn[ctrlp_disp:pptp_ctrl.c:956]: Non-zero Async Control Character Maps are not supported!
Jul 19 16:26:22 silentone pppd[16136]: CHAP authentication succeeded
Jul 19 16:26:22 silentone pppd[16136]: MPPE 128-bit stateless compression enabled
Jul 19 16:26:24 silentone pppd[16136]: local  IP address 10.0.0.96
Jul 19 16:26:24 silentone pppd[16136]: remote IP address 10.0.0.90
Jul 19 16:26:24 silentone pppd[16136]: primary   DNS address 10.0.0.8
Jul 19 16:26:24 silentone pppd[16136]: secondary DNS address 10.0.0.9
Jul 19 16:26:24 silentone NetworkManager[704]: <info> VPN connection 'vpn1' (IP4 Config Get) reply received from old-style plugin.
Jul 19 16:26:24 silentone NetworkManager[704]: <info> VPN Gateway: xx.xx.xx.xx
Jul 19 16:26:24 silentone NetworkManager[704]: <info> Tunnel Device: ppp0
Jul 19 16:26:24 silentone NetworkManager[704]: <info> IPv4 configuration:
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Internal Address: 10.0.0.96
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Internal Prefix: 32
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Internal Point-to-Point Address: 10.0.0.90
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Maximum Segment Size (MSS): 0
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Forbid Default Route: yes
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Internal DNS: 10.0.0.8
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   Internal DNS: 10.0.0.9
Jul 19 16:26:24 silentone NetworkManager[704]: <info>   DNS Domain: '(none)'
Jul 19 16:26:24 silentone NetworkManager[704]: <info> No IPv6 configuration
Jul 19 16:26:25 silentone NetworkManager[704]: <info> VPN connection 'vpn1' (IP Config Get) complete.
Jul 19 16:26:25 silentone NetworkManager[704]: <info> Policy set 'LAN on Realtek[Asus]' (eth0) as default for IPv4 routing and DNS.
Jul 19 16:26:25 silentone NetworkManager[704]: <info> Policy set 'LAN on Realtek[Asus]' (eth0) as default for IPv6 routing and DNS.
Jul 19 16:26:25 silentone NetworkManager[704]: <info> Writing DNS information to /sbin/resolvconf
Jul 19 16:26:25 silentone dnsmasq[1560]: setting upstream servers from DBus
Jul 19 16:26:25 silentone dnsmasq[1560]: using nameserver 10.0.0.9#53 for domain 10.in-addr.arpa
Jul 19 16:26:25 silentone dnsmasq[1560]: using nameserver 10.0.0.8#53 for domain 10.in-addr.arpa
Jul 19 16:26:25 silentone dnsmasq[1560]: using nameserver 2001:558:feed::2#53
Jul 19 16:26:25 silentone dnsmasq[1560]: using nameserver 75.75.75.75#53
Jul 19 16:26:25 silentone dnsmasq[1560]: using nameserver 75.75.76.76#53
Jul 19 16:26:25 silentone NetworkManager[704]: <info> VPN plugin state changed: started (4)
Jul 19 16:26:25 silentone dbus[612]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Jul 19 16:26:25 silentone dbus[612]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

答案1

根据输出,您没有找到route任何network路由到的vpn connection路径。尝试添加远程 VPN 端的路由以进入ppp0接口。对于vpn端的资源,必须有路由。类似

:~$ route
Kernel IP routing table
Destination     Gateway     Genmask         Flags   Metric  Ref Use Iface
default         10.0.1.1    0.0.0.0         UG      0       0   0   eth0
10.0.0.90       *           255.255.255.255 UH      0       0   0   ppp0
**10.0.0.0        *           255.255.255.0   U       1       0   0   ppp0**
10.0.1.0        *           255.255.255.0   U       1       0   0   eth0
xx-xx-xx-xx-st  10.0.1.1    255.255.255.255 UGH     0       0   0   eth0
xx-xx-xx-xx-st  10.0.1.1    255.255.255.255 UGH     0       0   0   eth0

路线可以通过多种方式添加:

告诉 VPN 服务器将路由推送到客户端

push "route 10.0.0.0 255.255.255.0"

或者在 ppp0 连接时简单添加手动路由

sudo route add -net 10.0.0.0/24 gw 10.0.0.90 dev ppp0

Network Connections或者在应用程序中添加路线All Settings

相关内容