1. 程式人生 > >IPSec VPN下訪問控制(Cisco)

IPSec VPN下訪問控制(Cisco)

#以A路由器為例(僅允許10.1.1.0/24和10.1.2.0/24的telnet流量互通):crypto map vpnmap 10 ipsec-isakmp set peer 192.168.2.1 set transform-set trans1 set ip access-group 151 in set ip access-group 161 out match address 101 interface Ethernet0/0 ip address 10.1.1.1 255.255.255.0 interface Serial1/0 ip address 192.168.1.1 255.255.255
.0 ip access-group 150 in ip access-group 160 out crypto map vpnmap access-list 101 permit ip 10.1.1.0 0.0.0.255 10.1.2.0 0.0.0.255 access-list 150 permit udp host 192.168.2.1 eq 500 host 192.168.1.1 eq 500 access-list 150 permit esp host 192.168.2.1 host 192.168.1.1 access-list 151 permit tcp 10.1.2.0 0.0.0.255 eq telnet 10.1
.1.0 0.0.0.255 access-list 151 permit tcp 10.1.2.0 0.0.0.255 10.1.1.0 0.0.0.255 eq telnet access-list 160 permit udp host 192.168.1.1 eq 500 host 192.168.2.1 eq 500 access-list 160 permit esp host 192.168.1.1 host 192.168.2.1 access-list 161 permit ip 10.1.1.0 0.0.0.255 10.1.2.0 0.0.0.255 eq telnet access-list 161 permit ip 10.1.1
.0 0.0.0.255 eq telnet 10.1.2.0 0.0.0.255