반응형

 

 

 

 

📌 Site to Site

참고자료

- https://www.cisco.com/c/en/us/td/docs/ios/12_2/security/command/reference/srfipsec.html#wp1017619

 

 

✏️ IKEv2 장점

  • IKEv2를 사용하면 인증에 EAP 사용가능
  • IKEv2는 시퀀스 번호와 확인 응답을 사용하여 신뢰성과 상태 관리 가능
  • 서비스 거부(DoS) 공격 복원력
  • IKEv2는 DPD(Dead Peer Detection) 및 NAT-T(Network Address Translation-Traversal)에 대한 기본 제공 지원을 제공합니다. URL 및 해시를 통해 인증서를 참조하여 조각화를 방지할 수 있습니다.

 

 

ISAKMP (Internet Key Exchange = IKEv2)

  • 1️⃣ 설정 장비#1 (정적 IP 설정)

 

참고자료

- https://www.cisco.com/en/US/docs/ios-xml/ios/sec_conn_ikevpn/configuration/15-1mt/Configuring_Internet_Key_Exchange_Version_2.html#GUID-8412F9B6-A3E2-4C28-A6E3-1A995FF71500

 

 

 

1. 인터페이스 구성(Lan, Wan)

  • 내부 및 외부 네트워크 peer 장비에 모두 연결되어 있는지 확인
  • 보통 Loopback 인터페이스를 만들어서 터널 사용
interface GigabitEthernet0/0
 description ## 외부 및 터널 IP ##
 ip address 172.17.1.1 255.255.255.252
 no shutdown

interface GigabitEthernet0/1
 description ## 내부 서버 IP ##
 ip address 10.20.10.1 255.255.255.0
 no shutdown

 

 

2. VPN 트래픽에 대한 ACL 구성

  • 터널을 위한 ACL 설정
access-list 100 remark tunnel ACL
access-list 100 permit gre host 172.17.1.1 host 172.17.1.2

 

 

3. IKEv2 Proposal 구성

  • no crypto ikev2 proposal default : 기본 proposal 지우기
  • crypto ikev2 proposal <proposal name>
  • encryption <encryption type>
    • 3des
    • aes-cbc-128
    • aes-cbc-192
    • aes-cbc-256
  • integrity <algorithm type>
    • SHA-2 family 256-bit
  • group <Diffie-Hellman (DH) group>
    • 1--768-bit DH
    • 2--1024-bit DH
    • 5--1536-bit DH
    • 14--Specifies the 2048-bit DH group.
    • 15--Specifies the 3072-bit DH group.
    • 16--Specifies the 4096-bit DH group.
    • 19--Specifies the 256-bit elliptic curve DH (ECDH) group.
    • 20--Specifies the 384-bit ECDH group.
    • 24--Specifies the 2048-bit DH group.
no crypto ikev2 proposal default
crypto ikev2 proposal jinsu_proposal
 encryption aes-cbc-256
 integrity sha256
 group 14

 

 

4. IKEv2 Policy 구성

  • no crypto ikev2 policy default : 기본 policy 지우기
  • crypto ikev2 policy <policy name>
  • proposal <proposal name>
no crypto ikev2 policy default
crypto ikev2 policy jinsu_policy
  proposal jinsu_proposal

 

 

5. IKEv2 Keyring 구성

  • crypto ikev2 keyring <keyring name>
  • peer <peer name>
  • address <상대방 외부 IP>
  • pre-shared-key <키 생성>
crypto ikev2 keyring jinsu_key
 peer jinsu_pr
  address 172.17.1.2
  pre-shared-key auhjinsu123

 

 

6. IKEv2 Profile 구성

  • crypto ikev2 profile <profile name>
  • match identity remote address <상대방 외부IP>
  • identity local address <내부 IP>
  • authentication local <authentication method>
  • authentication remote <authentication method>
  • keyring <keyring name>
crypto ikev2 profile jinsu_profile
 match identity remote address 172.17.1.2 255.255.255.255
 identity local address 172.17.1.1
 authentication local pre-share
 authentication remote pre-share
 keyring jinsu_key

 

 

7. transform-set 구성

  • 보안 프로토콜과 알고리즘 설정
  • crypto ipsec transform-set <Set-Name>
crypto ipsec transform-set auhjinsu esp-aes 256 esp-sha256-hmac
 mode tunnel

 

 

8. crypto map 생성 후 인터페이스에 설정

  • crypto map <Map Name> <Number> ipsec-isakmp
  • set peer <상대방 IP>
  • set transform-set <transform-set Name>
  • set ikev2-profile <profile name>
  • match address <ACL Number>
crypto map jinsu_map 10 ipsec-isakmp
 set peer 172.17.1.2
 set transform-set auhjinsu
 set ikev2-profile jinsu_profile
 match address 100
  • 터널 맺을 외부 인터페이스에 Map 설정
  • crypto map <Map Name>
interface GigabitEthernet0/0
 crypto map jinsu_map

 

 

9. 터널 인터페이스 설정

  • interface Tunnel<Number>
  • ip address <Tunnel IP>
  • tunnel source <외부 IP>
  • tunnel destination <상대방 source IP>
interface Tunnel12345
 ip address 10.255.100.1 255.255.255.252
 no ip redirects
 ip mtu 1400
 keepalive 3 3
 tunnel source 172.17.1.1
 tunnel destination 172.17.1.2

 

 

 

 

 

 

 

  • 2️⃣ 설정 장비#2 (정적 IP 설정)

 

1. 인터페이스 구성(Lan, Wan)

  • 내부 및 외부 네트워크 peer 장비에 모두 연결되어 있는지 확인
  • 보통 Loopback 인터페이스를 만들어서 터널 사용
interface GigabitEthernet0/0
 description ## 외부 및 터널 IP ##
 ip address 172.17.1.2 255.255.255.252
 no shutdown

interface GigabitEthernet0/1
 description ## 내부 서버 IP ##
 ip address 192.168.1.1 255.255.255.0
 no shutdown

 

 

2. IKEv2 Proposal 구성

  • no crypto ikev2 proposal default : 기본 proposal 지우기
  • crypto ikev2 proposal <proposal name>
  • encryption <encryption type>
    • 3des
    • aes-cbc-128
    • aes-cbc-192
    • aes-cbc-256
  • integrity <algorithm type>
    • SHA-2 family 256-bit
  • group <Diffie-Hellman (DH) group>
    • 1--768-bit DH
    • 2--1024-bit DH
    • 5--1536-bit DH
    • 14--Specifies the 2048-bit DH group.
    • 15--Specifies the 3072-bit DH group.
    • 16--Specifies the 4096-bit DH group.
    • 19--Specifies the 256-bit elliptic curve DH (ECDH) group.
    • 20--Specifies the 384-bit ECDH group.
    • 24--Specifies the 2048-bit DH group.
no crypto ikev2 proposal default
crypto ikev2 proposal jinsu_proposal
 encryption aes-cbc-256
 integrity sha256
 group 14

 

 

3. IKEv2 Policy 구성

  • no crypto ikev2 policy default : 기본 policy 지우기
  • crypto ikev2 policy <policy name>
  • proposal <proposal name>
no crypto ikev2 policy default
crypto ikev2 policy jinsu_policy
  proposal jinsu_proposal

 

 

4. IKEv2 Keyring 구성

  • crypto ikev2 keyring <keyring name>
  • peer <peer name>
  • address <모든 대역>
  • pre-shared-key <키 생성>
crypto ikev2 keyring jinsu_key
 peer jinsu_pr
  address 0.0.0.0 0.0.0.0
  pre-shared-key auhjinsu123

 

 

5. IKEv2 Profile 구성

  • crypto ikev2 profile <profile name>
  • match identity remote address <모든 대역>
  • identity local address <내부 IP>
  • authentication local <authentication method>
  • authentication remote <authentication method>
  • keyring <keyring name>
crypto ikev2 profile jinsu_profile
 match identity remote any
 identity local address 172.17.1.2
 authentication local pre-share
 authentication remote pre-share
 keyring jinsu_key

 

 

6. transform-set 구성

  • 보안 프로토콜과 알고리즘 설정
  • crypto ipsec transform-set <Set-Name>
crypto ipsec transform-set auhjinsu esp-aes 256 esp-sha256-hmac
 mode tunnel

 

 

7. crypto dynamic-map, crypto map 생성

  • crypto dynamic-map <Map Name> <Number>
  • set transform-set <transform-set Name>
  • set ikev2-profile <profile name>
crypto dynamic-map jinsu_map 10
 set transform-set auhjinsu
 set ikev2-profile jinsu_profile
  • crypto map <map name> <number> ipsec-isakmp dynamic <dynamic map name>
crypto map jinsu_dynamic_map 10 ipsec-isakmp dynamic jinsu_map

 

 

8. 인터페이스에 crypto map 설정

  • 터널 맺을 외부 인터페이스에 Map 설정
  • crypto map <Map Name>
interface GigabitEthernet0/0
 crypto map jinsu_dynamic_map

 

 

9. 터널 인터페이스 설정

  • interface Tunnel<Number>
  • ip address <Tunnel IP>
  • tunnel source <외부 IP>
  • tunnel destination <상대방 source IP>
interface Tunnel12345
 ip address 10.255.100.2 255.255.255.252
 no ip redirects
 ip mtu 1400
 keepalive 3 3
 tunnel source 172.17.1.2
 tunnel destination 172.17.1.1

 

 

 

 

 

📌 옵션

crypto isakmp invalid-spi-recovery
crypto isakmp keepalive 60
  • lifetime seconds
    • 시간이 지정된 수명(초)이 경과하면 ipsec이 해제됩니다.
  • lifetime kilobytes
    • 트래픽 볼륨 수명으로 인해 지정된 트래픽 양(KB)이 보안 연결 키로 보호된 후 보안 연결 시간이 초과됩니다.
crypto ipsec security-association lifetime seconds 43200
crypto ipsec security-association lifetime kilobytes 10000000
crypto ipsec security-association replay disable
crypto ipsec security-association replay window-size 1024

 

 

 

 

 

 

반응형

'Network > CISCO' 카테고리의 다른 글

[Network] CISCO - AAA 설정  (0) 2023.10.08
[Network] CISCO - Switch MAC차단 설정  (1) 2023.10.08
[Network] CISCO - IPSEC (IKEv1) 설정  (1) 2023.10.08
[Network] CISCO - MTU 설정  (0) 2022.07.24
[Network] CISCO - EtherChannel 설정  (0) 2022.07.24
반응형

 

 

📌 Site to Site

참고자료

- https://www.cisco.com/c/en/us/td/docs/ios/12_2/security/command/reference/srfipsec.html#wp1017619

 

 

ISAKMP (Internet Key Exchange = IKEv1)

  • 1️⃣ 설정 장비#1 (정적 IP 설정)

참고자료

- https://www.cisco.com/c/ko_kr/support/docs/security-vpn/ipsec-negotiation-ike-protocols/119425-configure-ipsec-00.html

 

 

1. 인터페이스 구성(Lan, Wan)

  • 내부 및 외부 네트워크 peer 장비에 모두 연결되어 있는지 확인
  • 보통 Loopback 인터페이스를 만들어서 터널 사용
interface GigabitEthernet0/0
 description ## 외부 및 터널 IP ##
 ip address 172.17.1.1 255.255.255.252
 no shutdown
!
interface GigabitEthernet0/1
 description ## 내부 서버 IP ##
 ip address 10.20.10.1 255.255.255.0
 no shutdown

 

 

2. ISAKMP(IKEv1) 정책 구성

  • crypto isakmp policy <priority> : 우선순위
  • encr aes 192 : 고급 암호화 192 bits.
  • authentication pre-share : 사전 공유키 [default]
  • group 2 : Group 2 (1024-bit)
  • hash : sha (default)
  • lifetime : (86400 seconds = default)
crypto isakmp policy 10
 encr aes 192
 authentication pre-share
 group 2

 

 

3. 암호화 ISAKMP 키 구성

  • crypto isakmp key <key 값> address <상대방 IP>
crypto isakmp key auhjinsu123 address 172.17.1.2

 

 

4. VPN 트래픽에 대한 ACL 구성

  • 터널을 위한 ACL 설정
access-list 100 remark tunnel ACL
access-list 100 permit gre host 172.17.1.1 host 172.17.1.2

 

 

5. transform-set 구성

  • 보안 프로토콜과 알고리즘 설정
  • crypto ipsec transform-set <Set-Name>
crypto ipsec transform-set auhjinsu esp-aes 192 esp-sha-hmac
 mode tunnel

 

 

6. Crypto map 구성 후 인터페이스에 적용

  • crypto map <Map Name> <Number> ipsec-isakmp
  • set peer <상대방 IP>
  • set transform-set <transform-set Name>
  • match address <ACL Number>
crypto map jinsu_map 10 ipsec-isakmp
 set peer 172.17.1.2
 set transform-set auhjinsu
 match address 100
  • 터널 맺을 외부 인터페이스에 Map 설정
  • crypto map <Map Name>
interface GigabitEthernet0/0
 crypto map jinsu_map

 

 

7. 터널 인터페이스 설정

  • interface Tunnel<Number>
  • ip address <Tunnel IP>
  • tunnel source <외부 IP>
  • tunnel destination <상대방 source IP>
interface Tunnel12345
 ip address 10.255.100.1 255.255.255.252
 no ip redirects
 ip mtu 1400
 keepalive 3 3
 tunnel source 172.17.1.1
 tunnel destination 172.17.1.2

 

 

  • 2️⃣ 설정 장비#2 (동적 IP 설정)

참고자료

- https://www.cisco.com/c/en/us/support/docs/security-vpn/ipsec-architecture-implementation/118048-technote-ipsec-00.html

 

 

1. 인터페이스 구성(Lan, Wan)

  • 외부 인터페이스는 보통 공인IP를 사용합니다.
  • 보통 Loopback 인터페이스를 만들어서 터널 사용
interface GigabitEthernet0/0
 description ## 외부 및 터널 IP ##
 ip address 172.17.1.2 255.255.255.252
 no shutdown
!
interface GigabitEthernet0/1
 description ## 내부 서버 IP ##
 ip address 192.168.1.1 255.255.255.0
 no shutdown

 

 

2. ISAKMP(IKEv1) 정책 구성

  • crypto isakmp policy <priority> : 우선순위
  • encr aes 192 : 고급 암호화 192 bits.
  • authentication pre-share : 사전 공유키 [default]
  • group 2 : Group 2 (1024-bit)
  • hash : sha (default)
  • lifetime : (86400 seconds = default)
crypto isakmp policy 10
 encr aes 192
 authentication pre-share
 group 2

 

 

3. 암호화 ISAKMP 키 구성

  • crypto isakmp key <key 값> address <모든대역 IP>
crypto isakmp key auhjinsu123 address 0.0.0.0

 

 

4. VPN 트래픽에 대한 ACL 구성

  • 터널을 위한 ACL 설정
access-list 100 remark tunnel ACL
access-list 100 permit gre host 172.17.1.2 host 172.17.1.1

 

 

5. transform-set 구성

  • 보안 프로토콜과 알고리즘 설정
  • crypto ipsec transform-set <Set-Name>
crypto ipsec transform-set auhjinsu esp-aes 192 esp-sha-hmac
 mode tunnel

 

 

6. Crypto Dynamic-map 생성, crypto map 생성 후 인터페이스 설정

  • crypto dynamic-map <Map Name> <Number>
  • set transform-set <transform-set Name>
crypto dynamic-map jinsu 10
 set transform-set auhjinsu
  • crypto map <Map Name> <Number> ipsec-isakmp dynamic <dynamic-map Name>
crypto map jinsu_map 10 ipsec-isakmp dynamic jinsu
  • 터널 맺을 외부 인터페이스에 Map 설정
  • crypto map <Map Name>
interface GigabitEthernet0/0
 crypto map jinsu_map

 

 

7. 터널 인터페이스 설정

  • interface Tunnel<Number>
  • ip address <Tunnel IP>
  • tunnel source <외부 IP>
  • tunnel destination <상대방 source IP>
interface Tunnel12345
 ip address 10.255.100.2 255.255.255.252
 no ip redirects
 ip mtu 1400
 keepalive 3 3
 tunnel source 172.17.1.2
 tunnel destination 172.17.1.1

 

 

반응형

'Network > CISCO' 카테고리의 다른 글

[Network] CISCO - Switch MAC차단 설정  (1) 2023.10.08
[Network] CISCO - IPSEC (IKEv2) 설정  (0) 2023.10.08
[Network] CISCO - MTU 설정  (0) 2022.07.24
[Network] CISCO - EtherChannel 설정  (0) 2022.07.24
[Network] CISCO - 기능 설정  (0) 2022.02.18
반응형

Track 설정

  • 원하는 인터페이스를 체크하여 조건이 맞으면 다른 인터페이스를 Down 시켜주는 기능
  • Track 1이 up 상태 시 down, down 상태 시 up
  • Track 2이 up 상태 시 down, down 상태 시 up
  • and 조건으로 Track 1, 2가 둘다 down상태 시 eix0 터널 인터페이스 다운 설정
예시

체크할 인터페이스 Track 설정
(config)# track 1 interface eth1
(config)# track 2 interface eth2

Track 1,2를 and 조건으로 체크 설정
(config)# track 10 list Boolean and
(config)# object 1 not
(config)# object 2 not

인터페이스에 track 설정
(config)# interface eix0
(config-if)# shutdown track 10

 

 

NAT 설정

  • Source NAT - 최종 경로를 지정한 후 패킷이 목적지로 나갈때 Source IP를 변경해서 나감
  • 나가는 인터페이스가 2개 일때 nat source에 두개 설정
  • NAT source에 auto 대신 NAT될 IP 설정 가능
  • source, destination에 network-list 적용 가능
# 사용자 192.168.1.100 -> (eth2)/NEXG VPN/(eth1) -> 서버 10.10.10.10
# 192.168.1.100 -> eth1 인터페이스 IP로 바뀌어서 나간다.

(config)# ip nat 10
(config-ip-nat)# source host 192.168.1.100
(config-ip-nat)# destination host 10.10.10.10
(config-ip-nat)# nat source eth1 auto

 

  • Destination NAT - 패킷이 들어올때 바로 Destination IP를 변경 함
# 사용자 192.168.1.100 -> (eth2)/NEXG VPN/(eth1) -> 서버 10.10.10.10
# 갈때는 192.168.1.100으로 나갔지만 상대방 패킷이 들어올때 192.168.1.200으로 NAT된다.

(config)# ip nat 10
(config-ip-nat)# source host 192.168.1.100
(config-ip-nat)# destination host 10.10.10.10
(config-ip-nat)# nat destination 192.168.1.200

 

 

 

반응형

'VPN > NEXG' 카테고리의 다른 글

[NEXG] 방화벽 보안(Firewall) 설정  (0) 2023.02.26
[NEXG] 정책 라우팅(Policy Based Routing) 설정  (0) 2023.02.26
[NEXG] Offloading 설정 (Config)  (0) 2023.02.26
[NEXG] 기본 설정(Config)  (0) 2023.02.26
반응형

 

1. Phase-2 상태가 UP 인가 ?

 

VPN Tunnel list 조회

# diagnose vpn tunnel list

 

  • No (SA=0) Down 상태

 

  • YES (SA=1) Up 상태

 

 

 

 

2. IKE Phase-1 상태가 UP 인가 ?

 

VPN IKE list 조회

# diagnose vpn ike gateway list

 

  • No (Connecting) Down 상태

  • Yes (Established) Up 상태

 

 

3.  체크리스트 확인

  • VPN 장비에 다른 방화벽이 있나요?
  • VPN 게이트웨이가 올바른 외부 인터페이스를 사용하도록 구성되어 있나요?
  • 상대방 공인 IP가 올바르게 구성되어 있습니까?
  • 외부 인터페이스에서 패킷 캡처를 실행하고 원격 피어에서 트래픽을 볼 수 있는지 확인합니다.
  • 포트 500/4500의 IKE 트래픽이 업스트림에 연결된 네트워크 디바이스에서 허용되는지 확인합니다

 

트래픽 확인 (IP, Port)

# diagnose sniffer packet any '<remote-peer-ip> and port (500 or 4500)' 6 0 l

 

Debug 확인

# diagnose debug console timestamp enable  
# diagnose debug application Ike -1
# diagnose debug enable

 

 

Phase 1은 established 상태인데 Phase 2가 Down 일때

  • 암호화 및 해시 알고리즘이 상대방 장비와 일치하는지 확인합니다.
  • PFS가 활성화되어 있는지 확인하고, 활성화되어 있으면 두 장치 모두에서 구성이 일치하는지 확인합니다.

Perfect Forward Secrecy (PFS)

기본적으로 Phase 2 key는 phase 1에서 생성된 세션 키에서 파생됩니다. PFS(Perfect Forward Secrecy)는 터널이 시작될 때와 Phase 2 key 수명이 만료될 때마다 새로운 Diffie-Hellman 교환을 강제로 수행하여 매번 새 키가 생성되도록 합니다. 이렇게 하면 Phase 2에서 생성된 키가 Phase 1 Key 또는 Phase 2에서 자동으로 생성된 다른 키와 관련이 없습니다.

 

  • quick mode selectors 가 양쪽간 일치하는지 확인합니다.
  • Phase-2가 여전히 작동하지 않는 경우 포트 500/4500에서 패킷 캡처를 실행하고 다음 명령을 실행합니다.
# diagnose vpn ike gateway list (or diagnose vpn ike gateway list name <tunnel-name>)
# diagnose debug console timestamp enable  
# diagnose debug application ike -1
# diagnose debug enable

 

 

반응형
반응형

 

 

방화벽 기본 옵션 설정

  • 방화벽에 기본 설정값과 IPSec 옵션 설정을 할 수 있음.
방화벽 기본 설정값과 IPSec에 사용하는 설정값이 들어있다.
(config)# security parameters

방화벽이 기본 Drop 상태일 때 Drop된 Session 로그 기록시 설정
(config)# audit-default-dropped

방화벽 출발지 IP별 Session 제한 값을 설정
(config)# session-limit 100000
  • NexG-UTM 장비는 Default Drop을 기본 정책이므로 기본 정책이 필요
  • Local out : UTM 장비 자체에서 패킷이 생성되어 나가는 패킷은 모두 허용됨
DHCP Server에서 사용하는 포트 오픈
(config)# ip rule 16
(config-ip-rule)# description DHCP Server
(config-ip-rule)# source any
(config-ip-rule)# destination any
(config-ip-rule)# protocol udp sport eq 68 dport eq 67
(config-ip-rule)# policy pass
(config-ip-rule)# log connections
(config-ip-rule)# enable
OSPF에서 사용하는 프로토콜 오픈
(config)# ip rule 17
(config-ip-rule)# description Connect Local OSPF
(config-ip-rule)# source any
(config-ip-rule)# destination any
(config-ip-rule)# protocol ospfigp
(config-ip-rule)# inbound interface eth0
(config-ip-rule)# policy pass
(config-ip-rule)# enable

 

 

 

객체 관리

Network-list 설정

  • 방화벽 Rule, PBR(Source, Destination)부분 객체 적용 가능.
(config)# network-list [network-list name] [ip address] description [name]


IP 한 개의 Host 객체 생성
(config)# network-list local 192.168.1.100/32 description Server-1
(config)# network-list local 192.168.1.200/32 description User-1

0 ~ 255번 까지의 IP 목록
(config)# network-list server 10.10.10.0/24

1 ~ 10번 까지의 IP 목록
(config)# network-list test 192.168.1.1 192.168.1.10

11 ~ 15번 까지의 IP 목록
(config)# network-list test 192.168.1.11 192.168.1.15
  • 객체 변경 수정 발생시 Rule 다시 적용, Network-list 객체 개수 제한 없음.
생성한 Network-list 객체 rule 적용 설정
(config)# ip rule 100
(config-ip-rule)# source network-list test
(config-ip-rule)# source network-list local
(config-ip-rule)# destination network-list server
(config-ip-rule)# policy pass
(config-ip-rule)# enable

 

 

Service-list 설정

  • 다양한 프로토콜 선택 가능,  객체 개수 제한 없음, 룰별 여러 객체 적용 가능
  • service-list 객체에 기본적으로 사용할 수 있는 프로토콜 이름이 있다
  • 프로토콜 이름이 없는경우 번호를 입력 
service-list 객체 생성 예시
(config)# service-list test icmp
(config)# service-list test tcp sport any dport eq 80 description http
(config)# service-list test udp sport any dport eq 53 description dns
service-list 객체 적용 예시
(config)# ip rule 100
(config-ip-rule)# source network-list local
(config-ip-rule)# destination network-list server
(config-ip-rule)# service-list test
(config-ip-rule)# policy pass
(config-ip-rule)# enable

 

 

IP rule 

차단 정책 설정

  • 192.168.1.0/24 대역에서 192.168.2.0/24 대역끼리 icmp를 차단 예시 rule
  • Protocol 지정하는 설정이 없으면 모든 Protocol을 선택함.
(config)# ip rule 100
(config-ip-rule)# description TEST rule
(config-ip-rule)# source 192.168.1.0/24
(config-ip-rule)# destination 192.168.2.0/24
(config-ip-rule)# protocol icmp
(config-ip-rule)# policy drop
(config-ip-rule)# log connections
(config-ip-rule)# enable
(config-ip-rule)# end

 

정책 설정 샘플 예시

PASS (단방향 허용 정책)
(config)# ip rule 1
(config-ip-rule)# source 192.168.1.0/24
(config-ip-rule)# destination 10.10.10.0/24
(config-ip-rule)# policy pass
(config-ip-rule)# enable

PASS (양방향 허용 정책)
(config)# ip rule 2
(config-ip-rule)# source 192.168.1.0/24
(config-ip-rule)# destination 10.10.10.0/24
(config-ip-rule)# policy pass bi-direction
(config-ip-rule)# enable
 
DROP (단방향 차단 정책)
(config)# ip rule 3
(config-ip-rule)# source 192.168.1.0/24
(config-ip-rule)# destination 10.10.10.0/24
(config-ip-rule)# policy drop
(config-ip-rule)# enable

DROP (양방향 차단 정책)
(config)# ip rule 4
(config-ip-rule)# source 192.168.1.0/24
(config-ip-rule)# destination 10.10.10.0/24
(config-ip-rule)# policy drop bi-direction
(config-ip-rule)# enable

 

 

반응형

'VPN > NEXG' 카테고리의 다른 글

[NEXG] Interface Track, NAT 설정  (0) 2023.10.08
[NEXG] 정책 라우팅(Policy Based Routing) 설정  (0) 2023.02.26
[NEXG] Offloading 설정 (Config)  (0) 2023.02.26
[NEXG] 기본 설정(Config)  (0) 2023.02.26
반응형

 

 

 

정책적 라우팅(Policy Based Routing)

 

PBR 구문 형식

  • Destination 이 없으면 0.0.0.0/0(any) 네트워크가 생략되어 있음(생략 가능)
  • policy (번호) : PBR 우선 순위 (라우팅의 AD 값과 비슷함)
  • table (번호) : PBR 의 목적지 주소와 GW 아이피 주소 및 인터페이스
(config)# ip route policy [policy_num] table [table_num] source [source] destination [destination] [gateway] [출력 Interface명] [dhcp]

 

 

 

터널 연결용 PBR 설정

유동 IP PBR 설정
(config)# ip route policy 1 table 1 source eth1 eth1 dhcp

고정 IP PBR 설정
(config)# ip route policy 2 table 2 source eth2 192.168.0.254 eth2

 

 

일반적인 PBR 설정

192.168.1.100/32 사용자가 10.10.10.10/32 목적지로 갈때 eth1 인터페이스로 나갑니다.
(config)# ip route policy 3 table 3 source 192.168.1.100/32 destination 10.10.10.10/32 eth1 dhcp

192.168.1.200/32 사용자가 10.10.10.10/32 목적지로 갈때 eth2 인터페이스 GW로 나갑니다.
(config)# ip route policy 4 table 4 source 192.168.1.200/32 destination 10.10.10.10/32 172.16.0.254 eth2
반응형

'VPN > NEXG' 카테고리의 다른 글

[NEXG] Interface Track, NAT 설정  (0) 2023.10.08
[NEXG] 방화벽 보안(Firewall) 설정  (0) 2023.02.26
[NEXG] Offloading 설정 (Config)  (0) 2023.02.26
[NEXG] 기본 설정(Config)  (0) 2023.02.26
반응형

 

 

Offloading 설정

  • offloading을 off시 모든 패킷을 CPU에서 처리 하기 때문에 트래픽이 많은 환경에서는 되도록 off 하지 않도록 권장.
  • schedule - 멀티 코어 상태에서 out-of-order를 줄일 수 있도록 세션 기반으로 처리 (기본설정 off)
  • reorder - IPS 엔진 통과후 re-orderd 발생을 줄이는 기능 (기본설정 off 권장)

 

(config)# ip offloading reroder
(config)# ip offloading schedule

(config)# ip offloading schedule all static
(config)# ip offloading reorder all

(config)# no ip offloading

Offloading 동작 상태 확인
# sh ip offloading

Offloading 동작 상태 상세 정보
# sh ip offloading statistics

 

반응형

'VPN > NEXG' 카테고리의 다른 글

[NEXG] Interface Track, NAT 설정  (0) 2023.10.08
[NEXG] 방화벽 보안(Firewall) 설정  (0) 2023.02.26
[NEXG] 정책 라우팅(Policy Based Routing) 설정  (0) 2023.02.26
[NEXG] 기본 설정(Config)  (0) 2023.02.26
반응형

 

기본 설정

hostname 설정
(config)# hostname NEXG_VPN

사용자 계정 설정
(config)# username jinsu secret jinsu1234

 

 

interface IP 설정

  • eth0 은 brige interface로 lan 포트에 대한 switch 포트다.
(config)# interface lo
(config-if)# ip address 192.168.0.1/32
(config-if)# no shutdown
!
(config)# interface eth1
(config-if)# description EXT_Port
(config-if)# ip address 192.168.1.1/30
(config-if)# ip address 192.168.2.1/30 secondary
(config-if)# no shutdown

 

 

line vty 설정

  • login local - 로컬 계정으로 로그인 허용
  • exec-timeout 5 0 - 장비에 접속시 5분동안 반응이 없으면 접속 종료
  • local secret digest sha512 - 장비 접속 인증방식 설정
기본 접속 설정 시
(config)# line vty
(config-line)# login local
(config-line)# exec-timeout 5 0
(config-line)# local secret digest sha512

tacacs+ 사용시
(config-line)# local tacacs+ local

 

 

웹서버 설정

  • HTTP
(config)# ip http port 17877
(config)# ip http server
  • HTTPS
(config)# ip http secure-port 17877
(config)# ip http secure-server

 

 

SSH 연결 설정

  • 장비 시간 설정 변경시 rsa key 재 생성 필요 ( rsa key 지우는 명령 X)
SSH 키 생성
# generate crypto key rsa label jinsu
jinsu 이름으로 crypto key 생성
# show crypto key mypubkey rsa

SSH 설정
(config)# ip ssh rsa keypair-name jinsu
(config)# ip ssh port 2222
(config)# ip ssh server

SSH 서버 상태 확인
# show ip ssh server status

 

 

Logging 설정

1. local 로그 저장

  • logging local all - 로컬에 모든 로그 저장
  • logging local path disk1:/log alert 30 purge 20 stat - 저장공간 30퍼 남으면 알람 20퍼 남으면 삭제
(config)# logging local all
(config)# logging local path disk1:/log alert 30 purge 20 stat

2. remote 로그 저장

(config)# logging remote 192.168.100.1 ips l7filter session appgw-http appgw-mail appgw-im appgw-ftp ipsec system audit vpdn user-identity
(config)# logging source 192.168.0.1

 

 

VOS 업그레이드 및 변경

# copy ftp://admin@192.168.100.1/vos-4.6-octeon-150126.bin disk0:/ /f
# boot system vos-4.6-octeon-150126.bin
# reload

 

 

수동 백업, 복원, 삭제

  • 수동 백업, 복원, 삭제
백업
# copy disk0:/startup-config disk0:/startup-config.bak
# show disk0:/startup-config.bak
복원
# copy disk0:/startup-config.bak disk0:/start-config
# copy disk0:/startup-config.bak disk0:/startup-config /f
삭제
# delete disk0:/startup-config.bak

 

 

공장 설정 초기화

# configure reset
[yes/no] yes
# reload
[yes/no] yes

 

 

인터페이스 상태 감시

  • 회선 연결 장비가 Hang 상태로 통신이 불가능 할 때 회선 링크를 강제로 끊는 기능

1. 고정 IP를 사용하는 경우

  • icmp 사용하면 상대 장비에 트래픽을 발생하여 차단하므로 주의해서 사용
  • icmp 패킷을 5초 간격으로 3번 응답 실패시 회선 Down
(config)# interface eth1
(config-if)# ip address 10.10.10.1/24 link-timeout 5 3 icmp 10.10.10.254

2. DHCP 를 사용하는 경우

  • arp 패킷을 5초 간격으로 3번 응답 실패시 회선 Down
(config)# interface eth2
(config-if)# ip address dhcp link-timeout 5 3 arp

인터페이스 상태 확인
# show ip interface brief

링크 상태 확인
# show link

 

필수 - 회선이 2개 이상일 경우 PBR 설정 필수

(config)# ip route policy 10 table 10 source eth1 10.10.10.254 eth1
(config)# ip route policy 20 table 20 source eth2 eth2 dhcp

Policy 확인
# show ip route policy
권장
1. link-timeout 5 3 arp ( VDSL, Metro 고속회선에 사용)
2. link-timeout 8 3 icmp ( ADSL 저속 회선 또는 손실이 많은 회선에 사용)

 

 

Static 라우팅

(config)# ip route 0.0.0.0/0 10.10.10.254

라우팅 확인
# show ip route

 

 

ECMP 라우팅

  • 라우팅 뒤에 AD값을 추가하여 Equal Cost 설정
(config)# ip route 0.0.0.0/0 eth1 dhcp
(config)# ip route 0.0.0.0/0 eth2 dhcp 100

 

 

NTP 설정

  • ntp ignore-offset - 기본 시간 (1000sec) 이상 시간차가 날 경우에도 동기화 설정
자동 설정
(config)# ntp source eth0
(config)# ntp server 203.248.240.140
(config)# ntp server 210.98.16.100
(config)# ntp ignore-offset
(config)# clock timezone KST 9

수동 설정 ( 1회 )
# clock ntpdate 203.248.240.140 

NTP 상태 확인
# show ntp status
# show ntp associations

 

 

VLAN 설정

VLAN 생성
(config)# vlan database
(config-vlan)# vlan 10 state enable
(config-vlan)# vlan 20 state enable

인터페이스에 VLAN 선언
(config)# interface eth0
(config-if)# switchport
(config-if)# switchport mode trunk
(config-if)# switchport allowd vlan all
(config-if)# no shutdown

(config)# interface lan1
(config-if)# switchport
(config-if)# switchport access vlan 10
(config-if)# no shutdown

(config)# interface lan2
(config-if)# switchport
(config-if)# switchport access vlan 20
(config-if)# no shutdown

VLAN 가상 인터페이스 설정
(config)# interface vlan0.10
(config-if)# ip addess 10.10.10.1
(config-if)# no shutdown

VLAN 확인
# show vlan brief

 

 

DHCP server 설정

내부 사용자 인터페이스
(config)# interface eth1
(config-if)# ip address 192.168.1.1/24
(config-if)# no shutdown

DHCP Pool 설정
(config)# ip dhcp pool jinsu
(dhcp-config)# network 192.168.1.0 255.255.255.0
(dhcp-config)# range 192.168.1.100 192.168.1.200
(dhcp-config)# dns-server 168.126.63.1
(dhcp-config)# dns-server 168.126.63.2
(dhcp-config)# default-router 192.168.1.1

DHCP 사용할 내부 인터페이스
(config)# ip dhcp server eth1

dhcp 확인
# show ip dhcp pool

 

 

VRRP 설정

  • virtual-ip 192.168.1.1 backup - 가상 GW 설정
  • circuit-failover eth2 100 - eth2 인터페이스가 Down되면 priority 100 감소
  • arp-send fail-over 3 - 링크가 살거나 장비가 살아올라올때 fail-over 시 GARP 주기 3회
(config)# router vrrp 10 eth1
(config-router)# virtual-ip 192.168.1.1 backup
(config-router)# priority 200
(config-router)# circuit-failover eth2 100
(config-router)# arp-send fail-over 3
(config-router)# enable

VRRP 확인
# show vrrp brief

 

 

System 성능 확인

CPU 기본 상태 보기 / 상세 상태 보기, 프로세스 Uptime 상태 확인
# sh process cpu detail

Memory 기본 상태 보기 / 상세 상태 보기, 프로세스 Uptime 상태 확인
# sh process memory detail

 

 

반응형

+ Recent posts