...
Блок кода |
---|
hostname 1700-ipsec tech-support login enable root login enable syslog max-files 3 syslog file-size 512 object-group service telnet port-range 23 exit object-group service ssh port-range 22 exit object-group service dhcp_server port-range 67 exit object-group service dhcp_client port-range 68 exit object-group service ntp port-range 123 exit object-group service ipsec_ports port-range 500 port-range 4500 exit object-group service snmp port-range 161-162 exit object-group service COA port-range 3799 port-range 31812-31813 port-range 1812-1813 exit object-group service redirect port-range 3128 port-range 3129 exit object-group network SoftWLC ip address-range 101.0.0.24 exit object-group network ipsec_remote_address ip prefix 172.31.250.0/24 exit object-group network gre_termination ip prefix 192.168.7.0/30 exit object-group url defaultserv url http://eltex-co.ru exit #Настраиваем взаимодействие с радиус-сервером, для динамического управления data-тунелями точек доступа. radius-server timeout 10 radius-server retransmit 5 radius-server host 101.0.0.24 key ascii-text testing123 timeout 11 priority 20 source-address 101.0.0.171 auth-port 31812 acct-port 31813 retransmit 10 dead-interval 10 exit aaa radius-profile PCRF radius-server host 101.0.0.24 exit #Настраиваем ESR, что бы с ним мог взаимодействовать радиус-сервер. das-server COA key ascii-text testing123 port 3799 clients object-group SoftWLC exit aaa das-profile COA das-server COA exit vlan 2 force-up exit vlan 7 name "mgmt" force-up exit vlan 100 name "user" force-up exit vlan 808 name "GRE" force-up exit vlan 1001 name "from_SoftWLC" force-up exit vlan 1108 force-up exit vlan 4094 force-up exit security zone trusted exit security zone user exit security zone mgmt exit security zone gre exit security zone ipsec exit security zone clients_inet exit #Настраиваем подсеть адресов клиентов, которые будем передавать на другой маршрутизатор, используя policy-based routing. ip access-list extended users_filter rule 1 action permit match protocol any match source-address 172.31.239.64 255.255.255.192 match destination-address any enable exit exit #DHCP-request для продления адреса от клиентов надо будет передавать на DHCP-сервер, он находится на том же ip, что и SotfWLC. ip access-list extended clients_dhcp rule 1 action permit match protocol udp match source-address 172.31.239.64 255.255.255.192 match destination-address 101.0.0.24 255.255.255.255 match source-port 68 match destination-port 67 enable exit exit #Настраиваем route-map, указываем маршрутизаторы, на которые будет передаваться клиентский трафик. route-map clients_br7 rule 1 #DHCP-request от клиентов передаем на DHCP сервер. match ip access-group clients_dhcp action set ip next-hop verify-availability 101.0.0.24 10 action permit exit rule 2 #Остальной трафик клиентов передаем на другой роутер, через который у них организован доступ в Интернет. match ip access-group users_filter action set ip next-hop verify-availability 10.12.12.2 10 action permit exit exit snmp-server snmp-server system-shutdown #разрешаем перезагрузку ESR по SNMP-команде от EMS. snmp-server community "private1" rw snmp-server community "public11" ro snmp-server host 101.0.0.24 exit #Интерфейс, который смотрит в Интернет, терминирует IPSec подключения точек доступа. bridge 1 vlan 1108 security-zone ipsec ip address 192.168.108.171/24 enable exit #Интерфейс административной подсети управления, необязателен. bridge 2 vlan 2 security-zone trusted ip address 192.168.110.37/24 enable exit #Интерфейс для взаимодействия с SoftWLC. bridge 3 description "SoftWLC" vlan 1001 security-zone mgmt ip address 101.0.0.171/24 enable exit #Интерфейс терминации GRE подключений точек доступа. bridge 5 vlan 808 security-zone gre ip address 192.168.7.1/30 ip address 192.168.7.2/30 enable exit #Интерфейс управления точками доступа. bridge 6 vlan 7 security-zone mgmt ip address 172.31.239.1/26 ip helper-address 101.0.0.24 ip tcp adjust-mss 1312 protected-ports protected-ports exclude vlan enable exit #Интерфейс, клиентов точек доступа. bridge 7 vlan 100 security-zone user ip address 172.31.239.65/26 ip helper-address 101.0.0.24 ip policy route-map clients_br7 #Включаем policy-based routing на интерфейсе. ip tcp adjust-mss 1312 location testing2 protected-ports protected-ports exclude vlan enable exit #Интерфейс, через который доступен роутер, на который будет отправляться трафик клиентов точек доступа. bridge 94 vlan 4094 security-zone clients_inet ip address 10.12.12.1/30 ip tcp adjust-mss 1312 enable exit interface port-channel 1 switchport forbidden default-vlan switchport general acceptable-frame-type tagged-only switchport general allowed vlan add 2,1001,1108,4094 tagged exit interface gigabitethernet 1/0/1 channel-group 1 mode auto exit interface gigabitethernet 1/0/2 channel-group 1 mode auto exit interface gigabitethernet 1/0/3 shutdown security-zone trusted ip firewall disable exit interface gigabitethernet 1/0/4 shutdown security-zone trusted ip firewall disable exit interface tengigabitethernet 1/0/1 shutdown ip firewall disable switchport forbidden default-vlan exit interface tengigabitethernet 1/0/2 shutdown ip firewall disable switchport forbidden default-vlan exit exit tunnel softgre 1 description "mgmt" mode management local address 192.168.7.1 default-profile enable exit tunnel softgre 1.1 bridge-group 6 enable exit tunnel softgre 2 description "data" mode data local address 192.168.7.2 default-profile enable exit security zone-pair trusted self rule 1 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port ssh enable exit rule 2 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port telnet enable exit rule 3 action permit match protocol icmp match source-address SoftWLC match destination-address any enable exit rule 4 action permit match protocol udp match source-address SoftWLC match destination-address any match source-port any match destination-port COA enable exit exit security zone-pair user self rule 10 action permit match protocol udp match source-address any match destination-address any match source-port dhcp_client match destination-port dhcp_server enable exit rule 20 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port redirect enable exit exit security zone-pair clients_inet self rule 10 action permit match protocol any match source-address any match destination-address any exit exit security zone-pair user clients_inet rule 1 action permit match protocol any match source-address any match destination-address any enable exit exit security zone-pair ipsec self rule 1 action permit match protocol udp match source-address any match destination-address any match source-port ipsec_ports match destination-port ipsec_ports enable exit rule 2 action permit match protocol esp match source-address any match destination-address any enable exit rule 3 #Т.к. трафик GRE появится из IPSec пакетов, то он будет считаться пришедшим из тоже зоны, что и родительский пакет. action permit match protocol gre match source-address ipsec_remote_address match destination-address gre_termination enable exit rule 4 action permit match protocol icmp match source-address ipsec_remote_address match destination-address gre_termination enable exit exit security zone-pair mgmt self rule 1 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port ssh enable exit rule 2 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port telnet enable exit rule 3 action permit match protocol icmp match source-address SoftWLC match destination-address any enable exit rule 4 action permit match protocol udp match source-address SoftWLC match destination-address any match source-port any match destination-port snmp enable exit rule 5 action permit match protocol udp match source-address SoftWLC match destination-address any match source-port any match destination-port COA enable exit rule 6 action permit match protocol tcp match source-address SoftWLC match destination-address any match source-port any match destination-port COA enable exit rule 7 action permit match protocol icmp match source-address any match destination-address any enable exit rule 10 action permit match protocol udp match source-address any match destination-address any match source-port dhcp_client match destination-port dhcp_server enable exit rule 11 action permit match protocol udp match source-address any match destination-address any match source-port dhcp_server match destination-port dhcp_server enable exit exit security zone-pair mgmt mgmt rule 1 action permit match protocol icmp match source-address any match destination-address any enable exit rule 10 action permit match protocol udp match source-address any match destination-address any match source-port dhcp_client match destination-port dhcp_server enable exit rule 20 action permit match protocol udp match source-address SoftWLC match destination-address any match source-port any match destination-port snmp enable exit rule 21 action permit match protocol udp match source-address any match destination-address SoftWLC match source-port any match destination-port snmp enable exit rule 22 action permit match protocol tcp match source-address SoftWLC match destination-address any match source-port any match destination-port snmp enable exit rule 23 action permit match protocol tcp match source-address any match destination-address SoftWLC match source-port any match destination-port snmp exit rule 30 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port telnet enable exit rule 31 action permit match protocol tcp match source-address any match destination-address any match source-port any match destination-port ssh enable exit rule 49 action permit match protocol udp match source-address any match destination-address SoftWLC match source-port any match destination-port ntp enable exit rule 50 action permit match protocol udp match source-address any match destination-address SoftWLC match source-port any match destination-port COA enable exit exit security zone-pair mgmt user rule 10 action permit match protocol udp match source-address SoftWLC match destination-address any match source-port dhcp_server match destination-port dhcp_server enable exit exit security zone-pair gre ipsec rule 1 action permit match protocol any match source-address gre_termination match destination-address ipsec_remote_address enable exit exit #Настраиваем пул адресов, которые будут выдаваться ТД используя mode config. address-assignment pool ipsec_pool_1 ip prefix 172.31.250.0/24 #Пул адресов, которые будут выдаваться точкам доступа #и использоваться как локальный ip (tunnel ip) для GRE тунелей. #Адреса не должны пересекаться с другими tunnel ip в EMS. data-tunnel address 192.168.7.2 #Адрес, на который точка доступа будет строить GRE data тунель. management-tunnel address 192.168.7.1 #Адрес, на который точка доступа будет строить GRE тунель управления. exit #Настраиваем IKE предложение: алгоритм хэширования MD5, группа Диффи-Хэллмана DH1, алгоритм шифрования aes128. security ike proposal dh1_md5_aes128 authentication algorithm md5 encryption algorithm aes128 exit #Настраиваем политику IKE. security ike policy psk_xauth1 lifetime seconds 86400 #Время жизни основного соединения (по истечению будет произведена повторная авторизация). pre-shared-key ascii-text testing123 #Пароль authentication method xauth-psk-key #Включаем использование расширеной авторизации XAUTH. authentication mode radius #Используем радиус-сервер для расширеной авторизации. proposal dh1_md5_aes128 #Используем настроенное выше предложение. exit #Настраиваем шлюзы, используемые подсети. security ike gateway ike1_from_inet ike-policy psk_xauth1 #Используем настроенную выше политику IKE. local address 192.168.108.171 #Адрес, на котором ждем IPSec клиентов. local network 192.168.7.0/30 #Локальная подсеть, трафик из которой будет заворачиваться в IPSec пакеты. remote address any #Адрес удаленных клиентов IPSec - разрешаем подключения с любых адресов. remote network dynamic pool ipsec_pool_1 #Для назначения клиенту параметров используем настроенный выше пул. mode policy-based #Используем режим policy-based dead-peer-detection action clear #В случае обнаружения недоступного клиента IPSec убираем его подключение. dead-peer-detection interval 60 #Интервал отправки dead-peer-detection пакетов. dead-peer-detection interval 180 #Время, по истечению которого, удаленный клиент IPSec считается недоступным, #если от него не приходят ответы на DPD пакеты. exit #Настраиваем предложение IPSec: алгоритм хэширования MD5, алгоритм шифрования AES128, протокол инкапсуляции пакетов ESP. security ipsec proposal md5_aes128_esp authentication algorithm md5 encryption algorithm aes128 exit #Настраиваем политику IPSec. security ipsec policy vpn1_pol1 lifetime seconds 3600 #Время жизни IPSec сhaild SA (по истечению будет произведена повторная авторизация). proposal md5_aes128_esp #Используемое предложение IPSec, настроенное выше. exit #Настраиваем IPSec VPN, к которому будут подсключаться точки доступа. security ipsec vpn for_INET_1 mode ike #Используем IKE. ike establish-tunnel by-request #Соединение IPSec устанавливается по запросу удаленной стороны. ike gateway ike1_from_inet #Используем настройки шлюза, подсетей, настроенных в IKE. ike ipsec-policy vpn1_pol1 #используем политику IPSec, настоенную выше. enable exit ip dhcp-relay ip route 0.0.0.0/0 192.168.108.1 200 wireless-controller nas-ip-address 101.0.0.171 data-tunnel configuration radius #Используем динамическое поднятие data-тунелей aaa das-profile COA aaa radius-profile PCRF enable exit ip telnet server ip ssh server clock timezone gmt +7 ntp enable ntp server 101.0.0.24 prefer exit |
...