Mas*_*imo 5 vpn cisco router cisco-vpn
我有一个 Cisco 877 路由器,它使用 ADSL 线路、单个公共 IP 地址和 NAT 将我的网络连接到 Internet;IOS版本是15。
一切正常,但我想将此路由器配置为 VPN 服务器,以便能够从外部连接到网络。
我曾尝试寻找文档,但我能找到的所有内容都与将 877 用作 VPN客户端或站点到站点 VPN 相关;我找不到任何关于让单个远程计算机访问内部网络的信息,而我可以使用 Windows 的 RRAS 或 ISA Server 轻松地做到这一点。
我知道 877 是 SOHO 路由器,它不是 VPN 服务器的最佳选择;但这是我的家庭网络,我只有一台电脑(目前)而且我是唯一的用户。我绝对不会购买企业级路由器只是为了在我工作时能够访问我的 PC :-p
我真的坚持这一点,经过多次测试,我永远无法让它工作。我正在为这个问题添加一个赏金,它将被授予一个完全有效的解决方案(而不是指向神秘的 Cisco 文档或不相关场景的一些指针)。
为了让人们提供帮助,这是我当前的路由器配置(去除了不相关和私人的细节)。让我们希望有人最终可以帮助我完成这项工作。
要点:
我想要的是:
这是配置:
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
Run Code Online (Sandbox Code Playgroud)
在埃文的大力支持和此页面的帮助下,我终于能够使其正常工作。
我在这里发布完整的配置,我接受这个答案以将其作为参考,但当然赏金将归埃文:-)
为了启用 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
Run Code Online (Sandbox Code Playgroud)
注1:对于VPN用户的认证,需要使用命令设置密码username <user> password <password>
,而不是更安全的username <user> secret <password>
命令,否则认证会失败,因为MD5加密的密码与CHAP不兼容;这在此处记录。
注 2:此配置分配给 VPN 客户端的 IP 地址是内部网络的一部分;这是最简单的方法,因为使用不同的子网需要向客户端提供到 LAN 的静态路由。它确实会更安全,但对于简单地访问家庭网络来说,这根本不值得这么麻烦。