我有一个Cisco 877路由器,它使用ADSL线路,单个公共IP地址和NAT将我的networking连接到Internet; IOS版本是15。
一切正常,但我想configuration此路由器是一个VPN服务器,能够从外部连接到networking。
我试过寻找文档,但是我能find的所有东西都与877充当VPN 客户端 ,或者站点到站点的VPN有关; 我找不到任何有关让单个远程计算机访问内部networking的事情,这是我可以使用Windows的RRAS或ISA Server轻松完成的。
我知道877是SOHO路由器,并不是VPN服务器的最佳select, 但是这是我的家庭networking,我只有一台电脑(现在),我是唯一的用户。 我绝对不会购买企业级路由器,只是为了能够在工作时接触到我的电脑:-p
我真的坚持这一点,经过很多testing,我从来没有得到它的工作。 我为这个问题增加了一个奖励,这个奖励将被授予一个完全可行的解决scheme (而不是一些指向隐藏的思科文档或无关情景的指针)。
为了让人们帮助,这里是我目前的路由器configuration(剥夺了不相关的和私人的细节)。 让我们希望有人终于可以帮助我做到这一点。
要点:
我想要的是:
这是configuration:
version 15.0 service password-encryption hostname Cisco877 aaa new-model aaa authentication login default local aaa authorization console aaa authorization exec default local aaa session-id common ip source-route ip cef ip domain name <my ISP's DNS name> ip name-server <my ISP's DNS server> no ipv6 cef password encryption aes username <Router's username> privilege 15 secret 5 <The encrypted password for my user account> ip ssh version 2 interface ATM0 no ip address no atm ilmi-keepalive interface ATM0.1 point-to-point pvc 8/75 encapsulation aal5mux ppp dialer dialer pool-member 1 interface FastEthernet0 spanning-tree portfast interface FastEthernet1 spanning-tree portfast interface FastEthernet2 spanning-tree portfast interface FastEthernet3 spanning-tree portfast interface Vlan1 ip address 192.168.42.1 255.255.255.0 ip nat inside ip virtual-reassembly interface Dialer0 ip address negotiated ip nat outside ip virtual-reassembly encapsulation ppp dialer pool 1 dialer-group 1 ppp authentication pap callin ppp pap sent-username <My ISP's username> password 7 <The encrypted ISP password> ip forward-protocol nd ip dns server ip nat inside source list 1 interface Dialer0 overload ip route 0.0.0.0 0.0.0.0 Dialer0 access-list 1 permit 192.168.42.0 0.0.0.255 dialer-list 1 protocol ip permit
所以根据思科的网站,是的,你可以让你的877成为一个服务器。 但我强烈build议不要这样做。 我设置了一个871路由器连接到一个头端2800路由器的VPN解决scheme,并有各种问题。 低端设备只是不能处理大量的同时VPN连接。 我的build议是购买一个VPN模块的2800或3800系列路由器。 硬件模块将允许更多的连接,但也将更好地处理连接。
你想如何设置它,并把头放在哪里取决于你,但我认为头端坐在你的networking外,正如你今天的877可能是最简单的。 在下面的链接中,你会发现很多方法来做到这一点,但最简单的方法就是像现在这样使用头端,但使用更强大的硬件。
拿出这些链接的空间,并search第二个“Easy VPN”。
http://www.cisco.com/en/US/products/sw/secursw/ps5299/
http://www.cisco.com/en/US/docs/routers/access/800/850/software/configuration/guide/857sg_bk.pdf
这是我没有像这样的路由器实际testing的尝试。 将以下内容添加到您的configuration中:
vpdn enable vpdn-group 1 accept-dialin protocol pptp virtual-template 1 exit ip local pool clients 192.168.200.1 192.168.200.127 interface virtual-template 1 encap ppp peer default ip address pool clients ip unnumbered vlan1 no keepalive ppp encrypt mppe auto required ppp authentication ms-chap aaa authentication ppp default local
这应该启用VPN拨号(VPDN),创build一个VPDN组接受传入的PPTP,创build一个IP池分配给客户端,创build虚拟模板接口分配给客户端,并打开PPP用户的本地身份validation。 MS-CHAP和MPPEencryption将是必需的(我相信在Windows中是默认的)。
我急于想看看我是否能够在第一次尝试中得到正确的答案,或者实际上是。
我终于能够使用埃文的大力支持和这个页面 。
我发布完整的configuration在这里,我接受这个答案,把它作为一个参考,但当然赏金是要埃文:-)
这是需要添加到路由器的configuration,以启用PPTP和L2TP拨入VPN访问:
aaa authentication ppp default local vpdn enable vpdn-group VPN_Clients accept-dialin protocol any virtual-template 1 no l2tp tunnel authentication crypto isakmp policy 1 encr 3des authentication pre-share group 2 crypto isakmp key <IPSEC PRE-SHARED-KEY> address 0.0.0.0 0.0.0.0 crypto ipsec transform-set VPN_TS esp-3des esp-sha-hmac mode transport crypto dynamic-map VPN_DYN_MAP 1 set nat demux set transform-set VPN_TS crypto map VPN_MAP 1 ipsec-isakmp dynamic VPN_DYN_MAP interface Dialer0 crypto map VPN_MAP ip local pool VPN_POOL 192.168.42.240 192.168.42.249 interface Virtual-Template1 ip unnumbered Vlan1 ip nat inside peer default ip address pool VPN_POOL no keepalive ppp encrypt mppe auto required ppp authentication ms-chap-v2 ms-chap chap
注1 :对于VPN用户的validation,需要用命令username <user> password <password>设置密码,而不是更安全的username <user> secret <password> ,否则validation失败,因为MD5encryption的密码是与CHAP不兼容; 这是logging在这里 。
注2 :此configuration为VPN客户端分配作为内部networking一部分的IP地址; 这是最简单的方法,因为使用不同的子网需要为客户端提供静态路由到局域网。 这确实会更安全,但是对于简单的家庭networking来说,这是不值得的。