4월 15일 (ASA, ASA HA)
문제1. 방화벽을 구성하는 핵심적인 기술에는 어떠한 것이 있는지 서술하세요.
Traffic을 제어하여 특정 Network을 보호하는 기능
- ASA는 Security Level이 높은 곳에서 낮은 곳으로 향하는 Traffic에 대해
connection table을 생성하고, (Inspect (Session table) Return되는 traffic을 자동으로 허용하는 기능 제공
- 반대되는 Traffic에 대해서는 명시적으로 허용해야 한다 (ACL을 사용)
- Dynamic Application을 인지하고, 자동으로 열어 주는 기능도 제공
- 추가적으로, NAT,PAT, VPN등의 기능도 제공 됩니다.
문제2. 방화벽이 만드는 Table의 종류에는 무엇이 있는지 확인 하세요.
>> Session Table (inspect에 의한) #show conn | #show conn long | #show conn | in 1.1
>> NAT Table (NAT/PAT가 적용되어 있는 경우) #show xlate
>> Routing Table (L3로 동작하는 경우) #show route | #show route | in 10.1.1.0
>> MAC Table (L2로 동작하는 경우) #show mac-address-table
문제3. Firewall은 L3장비 입니까? L2 장비 입니까?
>> L3 (Route mode) >> 기존에 많이 사용됨
>> L2 (Transparent mode) >> 구성변경 필요 없음 (단순) (단 제약사항이 있음)
>> L2로 사용하는 기능을 ASA에서는 Transparent라고 합니다.
>> L2로 구성하면, 적용이 간단함 (기존의 Network이 변경되지 않음)
>> 단 L2로 사용하는 경우, 제약 사항이 있음
(Inside, Outside만 사용가능)
(Dynamic Routing Protocol 지원 안됨)
(NAT,PAT 사용시 STATIC Route 필요)
문제4. 방화벽에서 사용되는 inpsect와, security level의 동작 방식은 무엇입니까?
inspect는 packet에 대한 정보를 기록하는 기능 --> Session table (#show conn)
TCP -->> Source, Destination IP, Source, Destiation Port, TCP Flag (SYN, ACK, FIN, RST)
UDP -->> Source, Destination IP, Source, Destiation Port, >> timeout
(단 Security Level이 높은곳에서 낮은 곳으로 향하는 경우에 생성됨)
문제5. ASA에서 사용한 기본설정
1. Interface의 IP, Name, Security Level >> 3가지 설정
interface g0/0
ip add 1.1.1.254 255.255.255.0
nameif inside
security-level 100
no sh
#show interface ip brief
#show nameif
2. Routing Protocol (ASA를 L3로 사용하는 경우)
router ospf 1
network 1.1.1.0 255.255.255.0(서브넷마스크) area 0
#show ospf neighbor (#show ip ospf neighbor)
#show route (#show ip route)
3. 방화벽 정책
>> Security Level이 높은곳에서 낮은곳으로 통신 >> Default로 허용 (Session Table)
>> Security Level이 낮은곳에서 높은곳으로 통신 >> Default로 차단
(허용되야 한다면, ACL이 적용돼야 한다.)
access-list 100 permit tcp any any eq 23
access-group 100 in interface outside
#show access-list
#show run | in access-group
단 예외 상황 !!! >> ICMP는 Security Level에 적용안됨 (ICMP의 경우, inspect를 적용해야 함)
ASAv
211.239.123.0/24 의 OSPF정보를 지우고 default-information originate always 적용
그러나 R3에서 10.1.22.0/24의 경로 정보를 모르기 때문에 ping이 되지 않는다.
ASA 에서 PAT를 적용한다
ciscoasa(config)# object network NET_10
ciscoasa(config-network-object)# subnet 10.1.22.0 255.255.255.0
ciscoasa(config-network-object)# nat (inside,outside) dynamic interface
R2에서 R3으로 텔넷 접속 하는 동안 아래의 정보를 확인해본다
1. show conn
2. show xlate
ASA의 이중화 (HA)
ASA 두 대가 있다 하면 라우터와 달리 두 대의 ASA는 서로 연결된 포트를 통해 항상 동기화중이고 동기화 해야한다.
그래서 대장 ASA 한 대가 죽으면 대장 ASA의 포트 주소가 .253 주소였다면 대체된 부대장 ASA의 포트주소도 .253 인 것
대장 ASA가 죽는 순간 대장 ASA의 MAC주소도 부대장 ASA가 그대로 사용하기에, traffic도 대장 MAC주소를 쓰는 부대장 ASA쪽으로 감
ASA의 HA구성
- 2중화 = HA = Failover
- ASA의 경우, Failover는 동일한 2대의 장비를 구성하는 방식으로 동작한다.
- ASA(Active), ASA(StandBy)
- Active, StandBy 간에 Health check 및 configuration 동기화하는 Link가 필요하다 (g0/3)
-> = Failover Link (lan interface로 설정)
- Active, StandBy 간에 각종 table에 대한 동기화하는 link가 필요하다 (g0/4)
-> = State Link (link state로 설정)
ASA1
ciscoasa(config)# failover lan uni primary
ciscoasa(config)# failover lan interface failover g0/3
INFO: Non-failover interface config is cleared on GigabitEthernet0/3 and its sub-interfaces
ciscoasa(config)# failover interface ip failover 3.3.3.1 255.255.255.0 standby 3.3.3.2
ciscoasa(config)# failover link state g0/4
INFO: Non-failover interface config is cleared on GigabitEthernet0/4 and its sub-interfaces
ciscoasa(config)# failover interface ip state 4.4.4.1 255.255.255.0 standby 4.4.4.2
ciscoasa(config)# failover
ciscoasa(config)# int g0/3
ciscoasa(config-if)# no sh
ciscoasa(config-if)# int g0/4
ciscoasa(config-if)# no sh
ASA2
ciscoasa(config)# failover lan uni secondary
ciscoasa(config)# failover lan interface failover g0/3
INFO: Non-failover interface config is cleared on GigabitEthernet0/3 and its sub-interfaces
ciscoasa(config)# failover interface ip failover 3.3.3.1 255.255.255.0 standby 3.3.3.2
ciscoasa(config)# failover link state g0/4
INFO: Non-failover interface config is cleared on GigabitEthernet0/4 and its sub-interfaces
ciscoasa(config)# failover interface ip state 4.4.4.1 255.255.255.0 standby 4.4.4.2
ciscoasa(config)# failover
ciscoasa(config)# int g0/3
ciscoasa(config-if)# no sh
ciscoasa(config-if)# int g0/4
ciscoasa(config-if)# no sh
방화벽 총합 실습
1. VLAN 구성 (SW1, SW2, SW5, SW6)에 VLAN 구성
2. Trunk, Etherchannel 구성 (SW1 <-> SW2)
3. STP 구성
>> SW1,SW2,SW5,SW6에 RSTP로 변경합니다.
>> VLAN 10은 SW5의 E0/3이 Blocking
>> VLAN 20은 SW6의 E0/3이 Blocking
4. HSRP 구성
SW1,SW2에 VLAN10,VLAN 20에 대한 HSRP를 구성합니다.
SW1은 VLAN 10에 대해, Active,
SW2은 VLAN 20에 대해, Active로 설정
5. OSPF 구성 (Inside)
SW1,SW2,ASA1에 OSPF를 구성합니다.
>> ASA에는 OSPF가 구성되어 있습니다.
>> ASA가 VLAN 100에 대해서, OSPF DR이 되도록 설정
6. OSPF 구성 (outside)
SW3,SW4,ASA1에 OSPF를 구성합니다.
>> ASA에는 OSPF가 구성되어 있습니다.
>> ASA가 VLAN 200에 대해서, OSPF DR이 되도록 설정
>> SW3,SW4에서는 OSPF로 Default Route를 전파
7. BGP를 통해 외부와 연동
- SW3, SW4간에 IBGP를 설정
- KT, SKB간에 EBGP설정
- SW3, KT간에 EBGP를 설정
- SW4, SKB간에 EBGP를 설정
8. ASA에서 PAT를 설정합니다.