Powered by Blogger.

CẤU HÌNH MẪU CHO PHẦN THIẾT KẾ HỆ THỐNG MẠNG LAN KHÔNG DỰ PHÒNG


Xin các bạn lưu ý, cấu hình dưới đây chỉ tập trung các tính năng chính được đề cập trong thiết kế, và chưa được test nên có thể sẽ có một vài sai sót trong cú pháp.

Tuy nhiên mục đích chính của Configuration Template nhằm cung cấp các thức hiểu từng bước trong việc cấu hình hoàn chỉnh các tính năng trên từng thiết bị trong từng mô hình thiết kế.


Do đó để tìm hiểu rõ cụ thể từng tính năng được minh họa bên dưới, khuyến khích các bạn xem lại kiến thức từng module đã học liên quan. Cụ thể như sau:

- kiến thức trong phần cấu hình Firewall Policy, VPN site-to-site trên Router hoặc VPN Remote Access trên ASA, được đề cập kỹ trong chương trình CCNP Security.
- Kiến thức cấu hình VLAN, VTP, Trunking, STP, Ether Channel được đề cập trong module SWITCH trong chương trình CCNP.
- Kiến thức cấu hình Static Routing được đề cập trong chương trình CCNA R&S

Core/Distribution Switch Cisco Catalyst 3560G/3560-X

!Cấu hình VLAN

Switch(config)# vlan <Vlan-ID>

Switch(config-vlan)# name <Vlan-Name>


!Cấu hình VTP mode transparent

Switch(config)# vtp mode transparent


!Cấu hình STP

!Sử dụng Rapid PVST+ hoặc MST

Switch(config)# spanning-tree mode rapid-pvst


!Cấu hình Core/Distribution là STP Root Bridge

Switch(config)# spanning-tree vlan 1-4094 priority 8192


!Tối ưu hóa các tính năng của STP

Enable BPDU Guard, BPDU Filter một các tự động trên những port được cấu hình Spanning-!Tree Portfast

Switch(config)# spanning-tree portfast bpduguard default

Switch(config)# spanning-tree portfast bpdufilter default


!Cấu hình UDLD

!Enable UDLD trên các kết nối fiber nhằm phòng tránh hiện tượng “unidirectional connection”

Switch(config)# udld aggressive


!Cấu hình Broadcast Storm 

!Cấu hình Storm-Control (10%) trên các cổng Uplink (và Downlink đối với Core/Dist)

Switch(config-if)# storm-control broadcast level 10


!Cấu hình Port

!Cấu hình Trunk đối với các Port kết nối với Access Switch

Switch(config-if)# switchport mode trunk

! Nhằm phòng tránh tân công VLAN-Hopping, cấu hình native VLAN 999, là VLAN được tạo ra nhưng không sử dụng.

Switch(config-if)# switchport trunk native vlan 999


!Cấu hình Access đối với những cổng kết nối đến WAN Router, Firewall

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan <Vlan-ID>

Switch(config-if)# spanning-tree portfast


!Shutdown nhung port không sử dụng hiện tại

Switch(config-if)# shutdown

!Cấu hình Ether Channel

Switch(config)# interface range Gi0/x-y

Switch(config-if)# channel-protocol lacp

Switch(config-if)# channel-group <group-number> mode active

Switch(config)# port-channel load-balance src-dst-ip

!Cấu hình InterVlan Routing and Static Routing

!Cấu hình Layer 3 Interface và InterVlan Routing

Switch(config)# Interface vlan <VLAN-ID>

Switch(config-if)# ip address x.x.x.x y.y.y.y

Switch(config-if)# no shutdown

Switch(config-if)# no ip proxy-arp

Switch(config-if)# no ip unreachables

Switch(config-if)# no ip redirects

Switch(config-if)# no ip mask-reply

Switch(config-if)# no ip directed-broadcast

!

Switch(config)# Interface loopback 0

Switch(config-if)# ip address x.x.x.x 255.255.255.255

Switch(config-if)# no ip proxy-arp

Switch(config-if)# no ip unreachables

Switch(config-if)# no ip redirects

Switch(config-if)# no ip mask-reply

Switch(config-if)# no ip directed-broadcast

!

Switch(config)# ip routing

!

Switch(config)# ip route <IP-Subnet> <IP-Subnet-Mask> <IP-Next-Hop>


[!Cấu hình Device Hardening

!Cấu hình password

Switch(config)# service password-encryption

Switch(config)# no enable password

Switch(config)# enable secret <password>

Switch(config)# username <admin user> secret <password>


!Disable các dịch vụ không cần thiết

Switch(config)# no service tcp-small-servers

Switch(config)# no service udp-small-servers

Switch(config)# no ip bootp server

Switch(config)# no ip finger

Switch(config)# no service finger

Switch(config)# no service config

Switch(config)# no boot host

Switch(config)# no boot network

Switch(config)# no boot system

Switch(config)# no service pad

Switch(config-if)# no ip proxy-arp

Switch(config-if)# no ip unreachables

Switch(config-if)# no ip redirects

Switch(config-if)# no ip mask-reply

Switch(config-if)# no ip directed-broadcast

Switch(config)# no ip domain-lookup

!Disable ip source-route trong IP header

Switch(config)# no ip source-route

!Set timeout cho console laf 5 phút

Switch(config)# line console 0

Switch(config-line)# exec-time 5 0

!Chỉ cho phép truy cập vào Switch thông qua SSH

Switch(config)# access-list 11 permit x.x.x.x y.y.y.y

Switch(config)# access-list 11 deny any log

Switch(config)# line vty 0 4

Switch(config-line)# transport input ssh

Switch(config-line)# transport output none

Switch(config-line)# privilege level 1

Switch(config-line)# exec-timeout 5 0

Switch(config-line)# access-class 11 in

Switch(config-line)# login local

Switch(config)# line vty 0 15

Switch(config-line)# transport input none


!Tắt dịch vụ HTTP Server

Switch(config)# no ip http server

!Ngăn chặn tấn công vào từ chối dịch vụ vào Switch Processor làm Switch không thể xử lý các management traffic hợp lệ (STP, VTP, DTP, CDP, Routing, …)

Switch(config)# scheduler interval 500

!Cấu hình Management

!Cấu hình Syslog

Switch(config)# no logging console

Switch(config)# logging buffered 128000


!Cấu hình NTP

Switch(config)# ntp server <IP Address> key <Secret-key>

Switch(config)# ntp source loopback 0

Switch(config)# clock timezone GMT +7

Switch(config)# service timestamps log datetime msec localtime show-timezone

Switch(config)# service timestamps debug datetime msec localtime show-timezone


!Cấu hình CDP

!Mặc định CDP đã được tự động bật trên trên Switch.


!Cấu hình SNMP

Cấu hình SNMP Community Read-Only string để các Management Server (SolarWind, WhatsUpGold, …) có thể truy xuất vào thiết bị nhằm mục đích !monitor.

Switch(config)# snmp-server community <SNMP-String> RO 10

Switch(config)# access-list 10 remark Permit Read-Only SNMP Access from NMS only

Switch(config)# access-list 10 permit x.x.x.x y.y.y.y

Switch(config)# access-list 10 deny any log

Switch(config)# snmp-server location <Server Room A> <5th Floor>


!Cấu hình Banner

!cấu hình banner để cảnh báo mỗi khi có người truy cập vào thiết bị

Switch(config)# banner motd ^

**************************** NOTICE *******************************

This is a private network facility protected by a security system.

Access to and use of this facility requires explicit written,

current authorisation and is strictly limited to the purposes of

this organization's business.

Unauthorised or any attempt at unauthorised access, use, copying,

alteration, destruction, or damage to its data, program, or

equipment may result in criminal or civil liability or both.

************************************************** *******************

Access/DMZ/Server Switch Cisco Catalyst 2960/2960S

!Cấu hình VLAN

Switch(config)# vlan <Vlan-ID>

Switch(config-vlan)# name <Vlan-Name>

!Cấu hình VTP mode transparent

Switch(config)# vtp mode transparent


!Cấu hình STP

!Sử dụng Rapid PVST+ hoặc MST

Switch(config)# spanning-tree mode rapid-pvst

!Tối ưu hóa các tính năng của STP

Enable BPDU Guard, BPDU Filter một các tự động trên những port được cấu hình Spanning-!Tree Portfast

Switch(config)# spanning-tree portfast bpduguard default

Switch(config)# spanning-tree portfast bpdufilter default


!Cấu hình UDLD

!Enable UDLD trên các kết nối fiber nhằm phòng tránh hiện tượng “unidirectional connection”

Switch(config)# udld aggressive

!Cấu hình Broadcast Storm

!Cấu hình Storm-Control (10%) trên các cổng Uplink (và Downlink đối với Core/Dist)

Switch(config-if)# storm-control broadcast level 10


!Cấu hình Layer 2 Port

!Cấu hình Trunk đối với các Port kết nối với Access Switch

Switch(config-if)# switchport mode trunk

! Nhằm phòng tránh tân công VLAN-Hopping, cấu hình native VLAN 999, là VLAN được tạo ra nhưng không sử dụng.

Switch(config-if)# switchport trunk native vlan 999

!Cấu hình Access đối với những cổng kết nối đến WAN Router, Firewall

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan <Vlan-ID>

Switch(config-if)# spanning-tree portfast

!Shutdown nhung port không sử dụng hiện tại

Switch(config-if)# shutdown

!Cấu hình Ether Channel

Switch(config)# interface range Gi0/x-y

Switch(config-if)# channel-protocol lacp

Switch(config-if)# channel-group <group-number> mode active

Switch(config)# port-channel load-balance src-dst-ip

!Cấu hình Device Hardening

!Cấu hình password

Switch(config)# service password-encryption

Switch(config)# no enable password

Switch(config)# enable secret <password>

Switch(config)# username <admin user> secret <password>

!Disable các dịch vụ không cần thiết

Switch(config)# no service tcp-small-servers

Switch(config)# no service udp-small-servers

Switch(config)# no ip bootp server

Switch(config)# no ip finger

Switch(config)# no service finger

Switch(config)# no service config

Switch(config)# no boot host

Switch(config)# no boot network

Switch(config)# no boot system

Switch(config)# no service pad

Switch(config)# no ip domain-lookup

Switch(config-if)# no ip proxy-arp

Switch(config-if)# no ip unreachables

Switch(config-if)# no ip redirects

Switch(config-if)# no ip mask-reply

Switch(config-if)# no ip directed-broadcast

!Disable ip source-route trong IP header

Switch(config)# no ip source-route

!Set timeout cho console laf 5 phút

Switch(config)# line console 0

Switch(config-line)# exec-time 5 0

!Chỉ cho phép truy cập vào Switch thông qua SSH

Switch(config)# access-list 11 permit x.x.x.x y.y.y.y

Switch(config)# access-list 11 deny any log

Switch(config)# line vty 0 4

Switch(config-line)# transport input ssh

Switch(config-line)# transport output none

Switch(config-line)# privilege level 1

Switch(config-line)# exec-timeout 5 0

Switch(config-line)# access-class 11 in

Switch(config-line)# login local

Switch(config)# line vty 0 15

Switch(config-line)# transport input none


!Tắt dịch vụ HTTP Server

Switch(config)# no ip http server

!Ngăn chặn tấn công vào từ chối dịch vụ vào Switch Processor làm Switch không thể xử lý các management traffic hợp lệ (STP, VTP, DTP, CDP, Routing, …)

Switch(config)# scheduler interval 500

!Cấu hình Management

!Cấu hình Syslog

Switch(config)# no logging console

Switch(config)# logging buffered 128000


!Cấu hình NTP

Switch(config)# ntp server <IP Address> key <Secret-key>

Switch(config)# ntp source loopback 0

Switch(config)# clock timezone GMT +7

Switch(config)# service timestamps log datetime msec localtime show-timezone

Switch(config)# service timestamps debug datetime msec localtime show-timezone


!Cấu hình CDP

!Mặc định CDP đã được tự động bật trên trên Switch.


!Cấu hình SNMP

Cấu hình SNMP Community Read-Only string để các Management Server (SolarWind, WhatsUpGold, …) có thể truy xuất vào thiết bị nhằm mục đích !monitor.

Switch(config)# snmp-server community <SNMP-String> RO 10

Switch(config)# access-list 10 remark Permit Read-Only SNMP Access from NMS only

Switch(config)# access-list 10 permit x.x.x.x y.y.y.y

Switch(config)# access-list 10 deny any log

Switch(config)# snmp-server location <Server Room A> <5th Floor>


!Cấu hình Banner

!cấu hình banner để cảnh báo mỗi khi có người truy cập vào thiết bị

Switch(config)# banner motd ^

**************************** NOTICE *******************************

This is a private network facility protected by a security system.

Access to and use of this facility requires explicit written,

current authorisation and is strictly limited to the purposes of

this organization's business.

Unauthorised or any attempt at unauthorised access, use, copying,

alteration, destruction, or damage to its data, program, or

equipment may result in criminal or civil liability or both.

************************************************** *******************


WAN Router Cisco 2900 ISR2

!Cấu hình WAN Interface

Router(config-if)# encapsulation ppp

Router(config-if)# no cdp enable

Router(config-if)# ip address x.x.x.x y.y.y.y

Router(config-if)# no ip proxy-arp

Router(config-if)# no ip unreachables

Router(config-if)# no ip redirects

Router(config-if)# no ip mask-reply

Router(config-if)# no ip directed-broadcast


!Cấu hình LAN Interface

Router(config-if)# ip address x.x.x.x y.y.y.y

Router(config-if)# no ip proxy-arp

Router(config-if)# no ip proxy-arp

Router(config-if)# no ip unreachables

Router(config-if)# no ip redirects

Router(config-if)# no ip mask-reply

Router(config-if)# no ip directed-broadcast


!Cấu hình Static Route

Router(config)# ip route <IP-Subnet> <IP-Subnet-Mask> <IP-Next-Hop>


!Cấu hình VTI IPSEC VPN Site-to-Site

!Cấu hình VPN Policy Phase 1 (ISAKMP)

Router(config)# crypto isakmp policy 1

Router(config-isakmp)# encr 3des

Router(config-isakmp)# authentication pre-share

Router(config-isakmp)# group 2

Router(config)# crypto isakmp key <secret-key> address <IP-Address> <Subnet-Mask>

Router(config)# crypto isakmp keepalive 10


!Cấu hình VPN Policy Phase 2 (IPSEC)

Router(config)# crypto ipsec transform-set TRAN_TEST esp-3des esp-sha-hmac

Router(config)# crypto ipsec profile VTI

Router(config-vti)# set transform-set TRAN_TEST


!Cấu hình Interface VTI và apply IPSEC profile

Router(config)# interface tunnel 0

Router(config-if)# ip address x.x.x.x y.y.y.y

Router(config-if)# tunnel source <IP-WAN-Interface> <SubnetMask>

Router(config-if)# tunnel destination <IP-Router-Next-Hop> <SubnetMask>

Router(config-if)# tunnel protection ipsec ipv4

Router(config-if)# tunnel protection ipsec profile VTI


!Cấu hình Device Hardening

!Cấu hình password

Router(config)# service password-encryption

Router(config)# no enable password

Router(config)# enable secret <password>

Router(config)# username <admin user> secret <password>


!Disable các dịch vụ không cần thiết

Router(config)# no service tcp-small-servers

Router(config)# no service udp-small-servers

Router(config)# no ip bootp server

Router(config)# no ip finger

Router(config)# no service finger

Router(config)# no service config

Router(config)# no boot host

Router(config)# no boot network

Router(config)# no boot system

Router(config)# no service pad

Router(config)# no ip domain-lookup


!Disable ip source-route trong IP header

Router(config)# no ip source-route

!Set timeout cho console la 5 phút

Router(config)# line console 0

Router(config-line)# exec-time 5 0


!Chỉ cho phép truy cập vào Router thông qua SSH

Router(config)# access-list 11 permit x.x.x.x y.y.y.y

Router(config)# access-list 11 deny any log

Router(config)# line vty 0 4

Router(config-line)# transport input ssh

Router(config-line)# transport output none

Router(config-line)# privilege level 1

Router(config-line)# exec-timeout 5 0

Router(config-line)# access-class 11 in

Router(config-line)# login local

Router(config)# line vty 0 15

Router(config-line)# transport input none


!Tắt dịch vụ HTTP Server

Router(config)# no ip http server

!Cấu hình Device Management

!Cấu hình Syslog

Router(config)# no logging console

Router(config)# logging buffered 128000


!Cấu hình NTP

Router(config)# ntp server <IP Address> key <Secret-key>

Router(config)# ntp source loopback 0

Router(config)# clock timezone GMT +7

Router(config)# service timestamps log datetime msec localtime show-timezone

Router(config)# service timestamps debug datetime msec localtime show-timezone


!Cấu hình CDP

!Mặc định CDP đã được tự động bật trên trên Router.

!Cấu hình SNMP

Cấu hình SNMP Community Read-Only string để các Management Server (SolarWind, WhatsUpGold, …) có thể truy xuất vào thiết bị nhằm mục đích !monitor.

Router(config)# snmp-server community <SNMP-String> RO 10

Router(config)# access-list 10 remark Permit Read-Only SNMP Access from NMS only

Router(config)# access-list 10 permit x.x.x.x y.y.y.y

Router(config)# access-list 10 deny any log

Router(config)# snmp-server location <Server Room A> <5th Floor>


!Cấu hình Banner

!cấu hình banner để cảnh báo mỗi khi có người truy cập vào thiết bị

Router(config)# banner motd ^

**************************** NOTICE *******************************

This is a private network facility protected by a security system.

Access to and use of this facility requires explicit written,

current authorisation and is strictly limited to the purposes of

this organization's business.

Unauthorised or any attempt at unauthorised access, use, copying,

alteration, destruction, or damage to its data, program, or

equipment may result in criminal or civil liability or both.

************************************************** *******************


Internet Router Cisco 1900 ISR2

!Cấu hình Internet Interface

Router(config# interface Gi0/1

Router(config-if)# no cdp enable

Router(config-if)# ip address 203.162.123.2 255.255.255.252

Router(config-if)# no ip proxy-arp

Router(config-if)# no ip unreachables

Router(config-if)# no ip redirects

Router(config-if)# no ip mask-reply

Router(config-if)# no ip directed-broadcast


!Cấu hình LAN Interface

Router(config)# interface Gi0/0

Router(config-if)# ip address 203.162.100.1 255.255.255.240

Router(config-if)# no ip proxy-arp

Router(config-if)# no ip proxy-arp

Router(config-if)# no ip unreachables

Router(config-if)# no ip redirects

Router(config-if)# no ip mask-reply

Router(config-if)# no ip directed-broadcast


!Cấu hình Static Route

Router(config)# ip route 0.0.0.0 0.0.0.0 203.162.123.1

!Cấu hình Device Hardening

!Cấu hình password

Router(config)# service password-encryption

Router(config)# no enable password

Router(config)# enable secret <password>

Router(config)# username <admin user> secret <password>


!Disable các dịch vụ không cần thiết

Router(config)# no service tcp-small-servers

Router(config)# no service udp-small-servers

Router(config)# no ip bootp server

Router(config)# no ip finger

Router(config)# no service finger

Router(config)# no service config

Router(config)# no boot host

Router(config)# no boot network

Router(config)# no boot system

Router(config)# no service pad

Router(config)# no ip domain-lookup


!Disable ip source-route trong IP header

Router(config)# no ip source-route

!Set timeout cho console la 5 phút

Router(config)# line console 0

Router(config-line)# exec-time 5 0


!Chỉ cho phép truy cập vào Router thông qua SSH

Router(config)# access-list 11 permit x.x.x.x y.y.y.y

Router(config)# access-list 11 deny any log

Router(config)# line vty 0 4

Router(config-line)# transport input ssh

Router(config-line)# transport output none

Router(config-line)# privilege level 1

Router(config-line)# exec-timeout 5 0

Router(config-line)# access-class 11 in

Router(config-line)# login local

Router(config)# line vty 0 15

Router(config-line)# transport input none


!Tắt dịch vụ HTTP Server

Router(config)# no ip http server


!Cấu hình Device Management

!Cấu hình Syslog

Router(config)# no logging console

Router(config)# logging buffered 128000


!Cấu hình NTP

Router(config)# ntp server <IP Address> key <Secret-key>

Router(config)# ntp source loopback 0

Router(config)# clock timezone GMT +7

Router(config)# service timestamps log datetime msec localtime show-timezone

Router(config)# service timestamps debug datetime msec localtime show-timezone



!Cấu hình CDP

!Mặc định CDP đã được tự động bật trên trên Router.


!Cấu hình SNMP

Cấu hình SNMP Community Read-Only string để các Management Server (SolarWind, WhatsUpGold, …) có thể truy xuất vào thiết bị nhằm mục đích !monitor.

Router(config)# snmp-server community <SNMP-String> RO 10

Router(config)# access-list 10 remark Permit Read-Only SNMP Access from NMS only

Router(config)# access-list 10 permit x.x.x.x y.y.y.y

Router(config)# access-list 10 deny any log

Router(config)# snmp-server location <Server Room A> <5th Floor>


!Cấu hình Banner

!cấu hình banner để cảnh báo mỗi khi có người truy cập vào thiết bị

Router(config)# banner motd ^

**************************** NOTICE *******************************

This is a private network facility protected by a security system.

Access to and use of this facility requires explicit written,

current authorisation and is strictly limited to the purposes of

this organization's business.

Unauthorised or any attempt at unauthorised access, use, copying,

alteration, destruction, or damage to its data, program, or

equipment may result in criminal or civil liability or both.

************************************************** *******************


Internet Firewall ASA5510

!Cấu hình Interface

ASA5510(config)# interface Gi0/0

ASA5510(config-if)# nameif TRUSTED

ASA5510(config-if)# ip address 192.168.10.1 255.255.255.0

ASA5510(config-if)# security-level 100

!

ASA5510(config)# interface Gi0/1

ASA5510(config-if)# nameif DMZ

ASA5510(config-if)# ip address 192.168.20.1 255.255.255.0

ASA5510(config-if)# security-level 50

!

ASA5510(config)# interface Gi0/2

ASA5510(config-if)# nameif UNTRUSTED

ASA5510(config-if)# ip address 203.162.100.2 255.255.255.240

ASA5510(config-if)# security-level 0


!Cấu hình Static Route

ASA5510(config)# route UNTRUSTED 0.0.0.0 0.0.0.0 203.162.100.1

ASA5510(config)# route TRUSTED 192.168.0.0 255.255.0.0 192.168.10.2


!Cấu hình Remote Access VPN

!Cấu hình VPN policy phase 1 (ISAKMP)

ASA5510(config)# crypto isakmp policy 1

ASA5510(config-isakmp)# authentication pre-share

ASA5510(config-isakmp)# encryption 3des

ASA5510(config-isakmp)# group 2


!Cấu hình VPN policy phase 2 (IPSEC)

ASA5510(config)# crypto ipsec transform-set 3DES-SHA esp-3des esp-sha-hmac

ASA5510(config)# crypto dynamic-map DYMAP 1 set transform-set 3DES-SHA

ASA5510(config)# crypto dynamic-map DYMAP 1 set reserve-route

ASA5510(config)# crypto map CRYPMAP ipsec-isakmp dynamic DYMAP


!Apply VPN policy phase 1 và phase 2 vào Interface UNTRUSTED

ASA5510(config)# crypto isakmp enable UNTRUSTED

ASA5510(config)# crypto map interface UNTRUSTED


!Cấu hình VPN Group Policy cho Group IT Admin

ASA5510(config)# access-list ACL_SPLIT_TUNNEL standard permit 192.168.0.0 255.255.0.0

ASA5510(config)# access-list ACL_VPN_IT extended permit ip any 192.168.0.0 255.255.0.0

ASA5510(config)# ip local pool VPN_IPPOOL_IT 192.168.50.21-192.168.50.254 mask 255.255.255.0

ASA5510(config)# group-policy VPN_IT internal

ASA5510(config)# group-policy VPN_IT attributes

ASA5510(config-vpn-att)# dns-server value 192.168.11.11 192.168.11.12

ASA5510(config-vpn-att)# vpn-filter value ACL_VPN_IT

ASA5510(config-vpn-att)# ip-comp enable

ASA5510(config-vpn-att)# split-tunnel-policy tunnelspecified

ASA5510(config-vpn-att)# split-tunnel-network-list value ACL_SPLIT_TUNNEL

ASA5510(config-vpn-att)# address-pools value VPN_IPPOOL_IT


!Cấu hình VPN tunnel-group

ASA5510(config)# tunnel-group TG_IT type remote-access

ASA5510(config)# tunnel-group TG_IT general-attributes

ASA5510(config-vpn-tunnel-ge)# address-pool VPN_IPPOOL_IT

ASA5510(config-vpn-tunnel-ge)# default-group-policy VPN_IT

ASA5510(config)# tunnel-group TG_IT ipsec-attributes

ASA5510(config-vpn-tunnel-att)# pre-shared-key 123456


!Tạo VPN user

ASA5510(config)# Username vpn-user1 password <password>

ASA5510(config)# Username vpn-user1 attributes

ASA5510(config-user-att)# vpn-group-policy TG_IT

ASA5510(config-user-att)# service-type remote-access


!Cấu hình NAT Publich Web (TCP:80) va Mail (POP3) ra ngoài Internet

ASA5510(config)# static (DMZ,UNTRUSTED) tcp interface 80 192.168.20.20 80 netmask 255.255.255.255

ASA5510(config)# static (DMZ,UNTRUSTED) tcp interface 110 192.168.20.20 110 netmask 255.255.255.255


!Cấu hình NAT n-1 cho phép người dùng có thể truy cập Internet

ASA5510(config)# global (UNTRUSTED) 1 interface


!Cấu hình NAT Exempt traffic tu DMZ->TRUSTED, DMZ->VPN, TRUSTED->DMZ, TRUSTED->VPN

ASA5510(config)# access-list DMZ_nat0 remark NO NAT Traffic DMZ->VPN, DMZ->TRUSTED

ASA5510(config)# access-list DMZ_nat0 extended permit ip 192.168.20.0 192.168.10.0 255.255.255.0 

ASA5510(config)# access-list DMZ_nat0 extended permit ip 192.168.20.0 192.168.50.0 255.255.255.0

!

ASA5510(config)# access-list TRUSTED_nat0 remark NO NAT Traffic TRUSTED->DMZ, TRUSTED->VPN

ASA5510(config)# access-list TRUSTED_nat0 extended permit ip 192.168.10.0 192.168.20.0 255.255.255.0 

ASA5510(config)# access-list TRUSTED_nat0 extended permit ip 192.168.10.0 192.168.50.0 255.255.255.0


ASA5510(config)# nat (DMZ) 0 access-list DMZ_nat0

ASA5510(config)# nat (TRUSTED) 0 access-list TRUSTED_nat0


!Cấu hình Firewall Policy

!Cấu hình ACL

ASA5510(config)# access-list TRUSTED_IN remark Permit traffic from Internal Network access Internet 

ASA5510(config)# access-list TRUSTED_IN extended permit ip any any

!

ASA5510(config)# access-list DMZ_IN remark Permit Servers from DMZ zone to access Internet and Internal IP Address 192.168.11.11

ASA5510(config)# access-list DMZ_IN extended permit ip any host 192.168.11.11

ASA5510(config)# access-list DMZ_IN extended deny ip any 192.168.0.0 255.255.0.0 log

ASA5510(config)# access-list DMZ_IN extended permit ip any any

!

ASA5510(config)# access-list UNTRUSTED_IN remark Permit Some traffic (mail,web) access to DMZ Zone from Internet 

ASA5510(config)# access-list DMZ_IN extended permit tcp any host 203.162.100.2 eq 80

ASA5510(config)# access-list DMZ_IN extended permit tcp any host 203.162.100.2 eq 110


!Apply ACL to Interface

ASA5510(config)# access-group TRUSTED_IN in interface TRUSTED

ASA5510(config)# access-group DMZ_IN interface DMZ

ASA5510(config)# access-group UNTRUSTED_IN interface UNTRUSTED


!Cấu hình Management

!Cho phép ping đến TRUSTED interface để troubleshoot

ASA5510(config)# icmp permit any TRUSTED


!Cấu hình PC có IP 192.168.44.44 được phép telnet vào ASA

ASA5510(config)# telnet 192.168.44.44 255.255.255.255 TRUSTED


!Cấu hình cho phép PC có IP 192.168.44.44 quản lý ASA thông qua ASDM (TCP port 4443)

ASA5510(config)# http server enable 4443

ASA5510(config)# http 192.168.44.44 255.255.255.255 TRUSTED


Internal Firewall ASA5550

!Cấu hình Interface

ASA5550(config)# interface Gi0/0

ASA5550(config-if)# nameif TRUSTED

ASA5550(config-if)# ip address 192.168.100.1 255.255.255.0

ASA5550(config-if)# security-level 100

!

ASA5550(config)# interface Gi0/1

ASA5550(config-if)# nameif UNTRUSTED

ASA5550(config-if)# ip address 192.168.101.1 255.255.255.0

ASA5550(config-if)# security-level 0


!Cấu hình Static Route

ASA5550(config)# route UNTRUSTED 0.0.0.0 0.0.0.0 192.168.101.2


!Cấu hình no NAT-Control

ASA5550(config)# no nat-control


!Cấu hình Firewall Policy

!Cấu hình ACL

ASA5550(config)# access-list TRUSTED_IN remark Permit traffic from Server Farrm access outside network

ASA5550(config)# access-list TRUSTED_IN extended permit ip any any

!

ASA5550(config)# access-list UNTRUSTED_IN remark Permit traffic access from outside to some Servers in Server Farm

ASA5550(config)# access-list UNTRUSTED_IN extended permit tcp any host 192.168.100.10 eq 443

ASA5550(config)# access-list UNTRUSTED_IN extended permit tcp any host 192.168.100.10 eq 445

ASA5550(config)# access-list UNTRUSTED_IN extended deny ip any any


!Apply ACL to Interface

ASA5550(config)# access-group TRUSTED_IN in interface TRUSTED

ASA5550(config)# access-group UNTRUSTED_IN in interface UNTRUSTED


!Cấu hình Management

!Cho phép ping đến TRUSTED interface để troubleshoot

ASA5550(config)# icmp permit any TRUSTED


!Cấu hình PC có IP 192.168.44.44 được phép telnet vào ASA

ASA5550(config)# telnet 192.168.44.44 255.255.255.255 TRUSTED


!Cấu hình cho phép PC có IP 192.168.44.44 quản lý ASA thông qua ASDM (TCP port 4443)

ASA5550(config)# http server enable 4443

ASA5550(config)# http 192.168.44.44 255.255.255.255 TRUSTED
    Blogger Comment
    Facebook Comment