OpenWrt 中配置了 VPN ,但无法启用,求解

2013-10-27 13:03:36 +08:00
 ooof
安装 12.09 版的 OpenWrt ,现在通过 pppoe 拨号,可用;

想内置 VPN ,安装了 ppp-mod-pptp ,/etc/config/network 配置如下,但 VPN 还是无法启用。

不知道是什么问题,附图是 LuCI 中的一个截图,不知道能不能帮着理解问题,也发出来。



/etc/config/network 配置:

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd0e:57bc:746f::/48'

config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth0.2'
option proto 'pppoe'
option username 'llll384'
option password 'llll82'
option peerdns '1'
option defaultrout '1'

config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config interface 'wifi'
option proto 'static'
option ipaddr '192.168.10.190'
option netmask '255.255.255.0'
option gateway '192.168.10.1'
option dns '8.8.8.8'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 2 3 4 5'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1'

config interface 'vpn'
option proto 'pptp'
option server 'jp.nnnnnn.net'
option username 'vpnnnnn'
option password 'pfnnnnn7'
option buffering '1'
option pppd_options 'mppe required'


LuCI 中的一个截图:

17915 次点击
所在节点    Linux
10 条回复
ericFork
2013-10-27 13:33:38 +08:00
你重启路由器了吗?
ooof
2013-10-27 13:40:43 +08:00
关闭 Linux ,重启路由器还是不行。 :(
ericFork
2013-10-27 13:45:33 +08:00
看一眼 openwrt 的 system log 吧,如果 vpn 是你自己搭的,也看看那边的 log
ooof
2013-10-27 13:54:48 +08:00
@ericFork 不好意思,这两个 log 我找了一下没有找到,是在什么位置?
ooof
2013-10-27 14:02:15 +08:00
这个:

root@OpenWrt:/tmp/log# logread
Oct 27 05:37:03 OpenWrt kern.debug kernel: [ 0.330000] pci 0000:00:00.0: [168c:0033] type 0 class 0x000280
Oct 27 05:37:03 OpenWrt kern.err kernel: [ 0.330000] pci 0000:00:00.0: invalid calibration data
Oct 27 05:37:03 OpenWrt kern.debug kernel: [ 0.330000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0001ffff 64bit]
Oct 27 05:37:03 OpenWrt kern.debug kernel: [ 0.330000] pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref]
Oct 27 05:37:03 OpenWrt kern.debug kernel: [ 0.330000] pci 0000:00:00.0: supports D1
Oct 27 05:37:03 OpenWrt kern.debug kernel: [ 0.330000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 0.340000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 0.340000] pci 0000:00:00.0: using irq 40 for pin 1
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 0.350000] Switching to clocksource MIPS
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 0.350000] NET: Registered protocol family 2
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.760000] cfg80211: Calling CRDA for country: US
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.770000] cfg80211: Regulatory domain changed to country: US
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.770000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.780000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.790000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.800000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.810000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.810000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.820000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.880000] PPP generic driver version 2.4.2
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 9.910000] PPP MPPE Compression module registered
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.080000] ip_tables: (C) 2000-2006 Netfilter Core Team
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.250000] NET: Registered protocol family 24
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.260000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.270000] ehci-platform ehci-platform: Generic Platform EHCI Controller
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.280000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.310000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.330000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.330000] hub 1-0:1.0: USB hub found
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.340000] hub 1-0:1.0: 1 port detected
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.360000] nf_conntrack version 0.5.0 (1979 buckets, 7916 max)
Oct 27 05:37:03 OpenWrt kern.warn kernel: [ 10.450000] pptp: Unknown symbol gre_del_protocol (err 0)
Oct 27 05:37:03 OpenWrt kern.warn kernel: [ 10.450000] pptp: Unknown symbol gre_add_protocol (err 0)
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.560000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.680000] usb 1-1: new high-speed USB device number 2 using ehci-platform
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.830000] hub 1-1:1.0: USB hub found
Oct 27 05:37:03 OpenWrt kern.info kernel: [ 10.830000] hub 1-1:1.0: 4 ports detected
Oct 27 05:37:05 OpenWrt kern.info kernel: [ 13.880000] device eth0.1 entered promiscuous mode
Oct 27 05:37:05 OpenWrt kern.info kernel: [ 13.880000] device eth0 entered promiscuous mode
Oct 27 05:37:05 OpenWrt daemon.notice netifd: Interface 'lan' is now up
Oct 27 05:37:05 OpenWrt daemon.notice netifd: Interface 'loopback' is now up
Oct 27 05:37:05 OpenWrt daemon.notice netifd: vpn (693): Could not resolve server address
Oct 27 05:37:06 OpenWrt kern.info kernel: [ 14.560000] eth0: link up (1000Mbps/Full duplex)
Oct 27 05:37:06 OpenWrt kern.info kernel: [ 14.580000] br-lan: port 1(eth0.1) entered forwarding state
Oct 27 05:37:06 OpenWrt kern.info kernel: [ 14.580000] br-lan: port 1(eth0.1) entered forwarding state
Oct 27 05:37:06 OpenWrt daemon.info pppd[738]: Plugin rp-pppoe.so loaded.
Oct 27 05:37:06 OpenWrt daemon.info pppd[738]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
ooof
2013-10-27 14:03:34 +08:00
Oct 27 05:37:06 OpenWrt daemon.notice pppd[738]: pppd 2.4.5 started by root, uid 0
Oct 27 05:37:06 OpenWrt user.notice ifup: Enabling Router Solicitations on lan (br-lan)
Oct 27 05:37:08 OpenWrt kern.info kernel: [ 16.580000] br-lan: port 1(eth0.1) entered forwarding state
Oct 27 05:37:08 OpenWrt user.notice ifup: Enabling Router Solicitations on loopback (lo)
Oct 27 05:37:09 OpenWrt user.info sysinit: PHY for wifi device radio0 not found
Oct 27 05:37:09 OpenWrt user.info sysinit: PHY for wifi device radio1 not found
Oct 27 05:37:10 OpenWrt user.info sysinit: 'radio3' is disabled
Oct 27 05:37:10 OpenWrt user.info sysinit: PHY for wifi device radio0 not found
Oct 27 05:37:10 OpenWrt user.info sysinit: PHY for wifi device radio1 not found
Oct 27 05:37:10 OpenWrt user.info sysinit: 'radio3' is disabled
Oct 27 05:37:10 OpenWrt user.info sysinit: PHY for wifi device radio0 not found
Oct 27 05:37:10 OpenWrt daemon.notice netifd: Interface 'vpn' is now down
Oct 27 05:37:10 OpenWrt user.info sysinit: PHY for wifi device radio1 not found
Oct 27 05:37:11 OpenWrt daemon.info pppd[738]: PPP session is 1399
Oct 27 05:37:11 OpenWrt daemon.warn pppd[738]: Connected to 80:fb:06:35:3c:d5 via interface eth0.2
Oct 27 05:37:11 OpenWrt daemon.info pppd[738]: Using interface pppoe-wan
Oct 27 05:37:11 OpenWrt daemon.notice pppd[738]: Connect: pppoe-wan <--> eth0.2
Oct 27 05:37:11 OpenWrt kern.info kernel: [ 20.380000] device wlan0 entered promiscuous mode
Oct 27 05:37:11 OpenWrt kern.info kernel: [ 20.460000] br-lan: port 2(wlan0) entered forwarding state
Oct 27 05:37:11 OpenWrt kern.info kernel: [ 20.460000] br-lan: port 2(wlan0) entered forwarding state
Oct 27 05:37:13 OpenWrt kern.info kernel: [ 22.460000] br-lan: port 2(wlan0) entered forwarding state
Oct 27 05:37:14 OpenWrt daemon.info pppd[738]: Remote message: Authentication success,Welcome!
Oct 27 05:37:14 OpenWrt daemon.notice pppd[738]: PAP authentication succeeded
Oct 27 05:37:14 OpenWrt daemon.notice pppd[738]: peer from calling number 80:FB:06:35:3C:D5 authorized
Oct 27 05:37:14 OpenWrt daemon.notice pppd[738]: local IP address 171.121.255.127
Oct 27 05:37:14 OpenWrt daemon.notice pppd[738]: remote IP address 171.121.254.1
Oct 27 05:37:14 OpenWrt daemon.notice pppd[738]: primary DNS address 202.99.216.113
Oct 27 05:37:14 OpenWrt daemon.notice pppd[738]: secondary DNS address 202.97.131.178
Oct 27 05:37:14 OpenWrt user.info sysinit: 'radio3' is disabled
Oct 27 05:37:14 OpenWrt daemon.notice netifd: Interface 'wan6' is now up
Oct 27 05:37:14 OpenWrt daemon.notice netifd: Interface 'wan' is now up
Oct 27 05:37:16 OpenWrt daemon.notice netifd: Interface 'vpn' is now down
Oct 27 05:37:16 OpenWrt kern.warn kernel: [ 25.080000] pptp: Unknown symbol gre_del_protocol (err 0)
Oct 27 05:37:16 OpenWrt kern.warn kernel: [ 25.080000] pptp: Unknown symbol gre_add_protocol (err 0)
Oct 27 05:37:17 OpenWrt user.notice ifup: Enabling Router Solicitations on wan (pppoe-wan)
Oct 27 05:37:18 OpenWrt user.info sysinit: Loading defaults
Oct 27 05:37:18 OpenWrt daemon.info pppd[1315]: Plugin pptp.so loaded.
Oct 27 05:37:18 OpenWrt daemon.info pppd[1315]: PPTP plugin version 1.00
Oct 27 05:37:18 OpenWrt daemon.notice pppd[1315]: pppd 2.4.5 started by root, uid 0
Oct 27 05:37:18 OpenWrt user.info sysinit: Loading synflood protection
Oct 27 05:37:18 OpenWrt user.info sysinit: Adding custom chains
Oct 27 05:37:19 OpenWrt user.info sysinit: Loading zones
Oct 27 05:37:20 OpenWrt user.info sysinit: Loading forwardings
Oct 27 05:37:20 OpenWrt user.info sysinit: Loading rules
Oct 27 05:37:21 OpenWrt user.info sysinit: Loading redirects
Oct 27 05:37:21 OpenWrt user.info sysinit: Loading includes
Oct 27 05:37:21 OpenWrt user.info sysinit: Optimizing conntrack
Oct 27 05:37:21 OpenWrt user.info sysinit: Loading interfaces
Oct 27 05:37:21 OpenWrt user.info firewall: adding lan (br-lan) to zone lan
Oct 27 05:37:21 OpenWrt user.notice ifup: Enabling Router Solicitations on wan6 (pppoe-wan)
Oct 27 05:37:22 OpenWrt user.info firewall: adding wan (pppoe-wan) to zone wan
Oct 27 05:37:23 OpenWrt daemon.err pppd[1315]: PPTP: failed to create PPTP socket (Protocol not supported)
Oct 27 05:37:24 OpenWrt user.info firewall: adding wan6 (pppoe-wan) to zone wan
Oct 27 05:37:25 OpenWrt authpriv.info dropbear[1661]: Running in background
Oct 27 05:37:27 OpenWrt user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Oct 27 05:37:27 OpenWrt user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Oct 27 05:37:30 OpenWrt daemon.info dnsmasq[1719]: started, version 2.62 cachesize 150
Oct 27 05:37:30 OpenWrt daemon.info dnsmasq[1719]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack
Oct 27 05:37:30 OpenWrt daemon.info dnsmasq-dhcp[1719]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Oct 27 05:37:30 OpenWrt daem
Xi
2013-10-27 15:40:56 +08:00
Oct 27 05:37:23 OpenWrt daemon.err pppd[1315]: PPTP: failed to create PPTP socket (Protocol not supported)

pptp 装好了吗?
#opkg update
#opkg install ppp-mod-pptp

P.S 楼主VPN信息曝了,赶紧修改去吧
ooof
2013-10-27 17:20:11 +08:00
1.第一段是说 pptp 有问题?

2.没有错误的装上了。

3.vpn 信息涂抹过。


有什么办法可以测试安装的 vpn 是否正确呢?
cj1324
2013-10-27 20:28:12 +08:00
web配置没玩过, 如果命令行配置的话,防火墙需要做一定的配置
griffinqiu
2013-10-28 09:23:36 +08:00
Open-WRT pptp + route + dnsmas.q + macnwan 折腾1月后成功飘过。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/87053

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX