반응형

 

 

방화벽 기본 옵션 설정

  • 방화벽에 기본 설정값과 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
반응형

 

기본 설정

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

 

 

반응형
반응형

 

 

 

 

 

 

Err-disable의 기능이란?

Switch에서 포트에 대해 장애 및 에러유무를 주기적으로 모니터링하며 에러가 발생하면 자동으로 포트가 Errdisabled 상태로 변경되며 Shutdown 상태가 됩니다. 이후 관리자가 조치를 취할 수 있도록 Event Log를 발생시켜줍니다.

Errdisabled 포트를 복구하려면 해당 포트에서 no shutdown 명령어를 입력해주어야 합니다.

 

 

 

 

Errdisable Detect 설정

장비마다 다르지만 아래와 같이 설정 가능한 옵션들이 많이 있습니다.
여기서 자주 사용하는 옵션만 설명 드리겠습니다.

Switch(config)#errdisable detect cause ?
  all                  Enable error detection on all cases
  arp-inspection       Enable error detection for arp inspection
  dhcp-rate-limit      Enable error detection on dhcp-rate-limit
  dtp-flap             Enable error detection on dtp-flapping
  gbic-invalid         Enable error detection on gbic-invalid
  inline-power         Enable error detection for inline-power
  l2ptguard            Enable error detection on l2protocol-tunnel
  link-flap            Enable error detection on linkstate-flapping
  loopback             Enable error detection on loopback
  pagp-flap            Enable error detection on pagp-flapping
  pppoe-ia-rate-limit  Enable error detection on PPPoE IA rate-limit
  psp                  Enable error detection on PSP
  security-violation   Enable error detection on 802.1x-guard
  sfp-config-mismatch  Enable error detection on SFP config mismatch

 

Switch(config)#errdisable detect cause all
모든 옵션을 포함합니다.

Switch(config)#errdisable detect cause dtp-flap
스위치를 Trunk로 연결했을 경우 trunk는 access 와 다르게 모든 VLAN 트래픽을 실어나르기 때문에 어떤 VLAN에 속하는지 표시해주는 헤더가 필요한데 두 스위치가 사용하는 encapsulation 설정이 다를 경우 발생합니다.

Switch(config)#errdisable detect cause link-flap
짧은 시간동안 스위치 포트가 Up/Down을 반복할 떄 발생합니다.

Switch(config)#errdisable detect cause pagp-flap
스위치간 Etherchannel 구성을 통해 여러개의 포트를 하나로 묶었을 때 묶음 조건이 다를 경우(ex=duplex)

Switch(config)#errdisable detect cause udld
STP프로토콜이 동작하기 위해 양방향 BPDU 프레임 교환이 필요한 스위치 연결에서 단방향 연결만 가능하여 STP프로토콜이 제대로 동작할 수 없을 경우에 발생합니다.

Switch(config)#errdisable detect cause rootguard
STP프로토콜의 root 역활을 하는 스위치에 root 스위치로부터 BPDU 프레임이 도착한 경우에 발생합니다.

 

 

 

 

자동으로 Errdisable 포트를 복구하는 명령어에 대해서 알아볼게요.

 

errdisable recovery 설정

Switch(config)#errdisable recovery cause ?
  all                      Enable timer to recover from all error causes
  arp-inspection           Enable timer to recover from arp inspection error disable state
  bpduguard                Enable timer to recover from BPDU Guard error
  channel-misconfig (STP)  Enable timer to recover from channel misconfig error
  dhcp-rate-limit          Enable timer to recover from dhcp-rate-limit error
  dtp-flap                 Enable timer to recover from dtp-flap error
  gbic-invalid             Enable timer to recover from invalid GBIC error
  inline-power             Enable timer to recover from inline-power error
  l2ptguard                Enable timer to recover from l2protocol-tunnel error
  link-flap                Enable timer to recover from link-flap error
  link-monitor-failure     Enable timer to recover from link monitoring failure
  loopback                 Enable timer to recover from loopback error
  mac-limit                Enable timer to recover from mac limit disable state
  oam-remote-failure       Enable timer to recover from OAM detected remote failure
  pagp-flap                Enable timer to recover from pagp-flap error
  port-mode-failure        Enable timer to recover from port mode change failure
  pppoe-ia-rate-limit      Enable timer to recover from PPPoE IA rate-limit error
  psecure-violation        Enable timer to recover from psecure violation error
  psp                      Enable timer to recover from psp
  security-violation       Enable timer to recover from 802.1x violation error
  sfp-config-mismatch      Enable timer to recover from SFP config mismatch error
  storm-control            Enable timer to recover from storm-control error
  udld                     Enable timer to recover from udld error
  unicast-flood            Enable timer to recover from unicast flood error
  vmps                     Enable timer to recover from vmps shutdown error

 

Switch(config)#errdisable recovery cause all (all대신에 하나씩 사용 가능합니다.)
Switch(config)#errdisable recovery interval 30 (기본 복구시간은 300초이고 30~86400초까지 설정가능합니다.)

 

 

 

테스트로 포트를 Errdisable 상태로 만들고 자동 복구가 되는지 확인해봤습니다.

*Jul  9 15:39:44.822: %PM-4-ERR_DISABLE: psecure-violation error detected on Et0/0, putting Et0/0 in err-disable state
*Jul  9 15:39:44.822: %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.7966.6802 on port Ethernet0/0.
*Jul  9 15:39:45.822: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down
*Jul  9 15:39:46.823: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to down

 

Switch#show errdisable recovery 
ErrDisable Reason            Timer Status
-----------------            --------------
arp-inspection               Enabled
bpduguard                    Enabled
channel-misconfig (STP)      Enabled
dhcp-rate-limit              Enabled
dtp-flap                     Enabled
gbic-invalid                 Enabled
inline-power                 Enabled
l2ptguard                    Enabled
link-flap                    Enabled
mac-limit                    Enabled
link-monitor-failure         Enabled
loopback                     Enabled
oam-remote-failure           Enabled
pagp-flap                    Enabled
port-mode-failure            Enabled
pppoe-ia-rate-limit          Enabled
psecure-violation            Enabled
security-violation           Enabled
sfp-config-mismatch          Enabled
storm-control                Enabled
udld                         Enabled
unicast-flood                Enabled
vmps                         Enabled
psp                          Enabled
dual-active-recovery         Disabled

Timer interval: 30 seconds

Interfaces that will be enabled at the next timeout:

Interface       Errdisable reason       Time left(sec)
---------       -----------------       --------------
Et0/0          psecure-violation           19

 

*Jul  9 15:40:14.813: %PM-4-ERR_RECOVER: Attempting to recover from psecure-violation err-disable state on Et0/0
*Jul  9 15:40:16.813: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Jul  9 15:40:17.813: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

 

 

 

 

 

 

감사합니다.

반응형
반응형

모든 글은 제가 공부하기 위해 편하게 기록하는 블로그입니다.

자세한 설명이 없거나 불편하실 수 있습니다. 감사합니다 !!

 

 

 

 

 

오늘은 Kali linux 다운로드 설치와 설정하는법에 대해서 공부할거에요.

 

먼저 www.kali.org/downloads/ 접속하셔서 원하는 버전을 설치해주세요.

 

 

 

 

저는 kali-linux-2020.2-installer-amd64.iso 파일을 받아서 연습해볼거에요

 

이제 VMware을 실행해주세요

 

Create a New Virtual Machine 을 눌러주세요.

 

 

 

 

아까 다운받은 iso 파일 경로를 설정해주세요.

 

 

Linux로 눌러주시고 Version은 Kali linux의 기본 베이스인 Debian 최신버전으로 설정해주세요.

 

위에 설정을 맞춰주세요

 

 

 

프로젝트 이름을 적어주세요

 

 

저는 disk size를 256GB로 설정하고 single file로 설정했어요.

 

용량과 disk를 어떻게 사용할지 골라주세요

 

 

 

Customize Hardware를 눌러주세요.

 

 

저는 Memory를 4GB로 맞추고 Processors를 4core로 설정했습니다

원하시는 설정으로 맞추세요

 

 

 

 

 

이제 만들었던 프로젝트로 들어가주세요.

 

 

Graphical install 을 선택하고 Enter를 눌러주세요.

 

 

저는 아시아, 한국, 대한민국 등등으로 설정을 했습니다.

 

원하시는 설정을 골라주세요

 

 

 

기본 호스트이름을 kali로 만들어줍니다.

 

도메인이 없으시면 그냥 계속을 눌러주세요.

 

이제 사용자 계정을 설정해주세요.

 

사용자 계정 비밀번호를 설정해주세요.

 

 

원하시는 설정을 하셔도 좋습니다. 보통은 자동 - 디스크 전체 사용을 합니다.

 

 

원하시는 설정하셔도 좋습니다. 보통은 모두 한 파티션에 설치합니다.(초보ㅠㅠ)

 

 

계속

 

예를 선택해주고 계속

 

슝슝

 

 

프록시가 없으시면 계속

 

저도 잘 몰라서 계속

 

예를 누르고 계속

 

부트로더를 /dev/sda로 선택해주시고 계속

 

계속을 눌러주세요.

 

이제 Kali linux가 실행이되는데 Enter를 눌러주세요.

 

아까 설정했던 사용자 계정을 입력해주세요.

 

 

Kali linux 설치가 끝났습니다. 한글이 깨져 보이네요..

 

봐주셔서 감사합니다.

다음편에는 Kali linux 한글패치에 대해서 공부해볼게요.

 

 

 

 

반응형

+ Recent posts