소개
이 문서에서는 SD-WAN Cisco IOS® XE 디바이스에서 TLS Syslog 서버를 구성하는 방법에 대한 포괄적인 지침을 제공합니다.
사전 요구 사항
SD-WAN Cisco IOS XE 디바이스에서 TLS Syslog 서버 컨피그레이션을 진행하기 전에 요구 사항을 충족하는지 확인합니다.
요구 사항
다음 주제에 대한 지식을 보유하고 있으면 유용합니다.
-
SD-WAN 컨트롤러 - 네트워크에 올바르게 구성된 SD-WAN 컨트롤러가 포함되어 있는지 확인합니다.
-
Cisco IOS XE SD-WAN Router - Cisco IOS XE SD-WAN 이미지를 실행하는 호환 라우터입니다.
-
Syslog 서버 - 로그 데이터를 수집 및 관리하기 위한 Ubuntu 기반 Syslog 서버(예: syslog-ng).
사용되는 구성 요소
이 문서의 정보는 다음 소프트웨어 및 하드웨어 버전을 기반으로 합니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
설정
1. Ubuntu 시스템에 syslog-ng 설치
Ubuntu 서버에 syslog-ng를 설정하려면 적절한 설치 및 컨피그레이션을 위해 다음 단계를 수행합니다.
1단계. 네트워크 설정 구성
Ubuntu 서버를 설치한 후 컴퓨터가 인터넷에 액세스할 수 있도록 고정 IP 주소 및 DNS 서버를 구성합니다. 이는 패키지 및 업데이트를 다운로드하는 데 매우 중요합니다.
2단계. syslog-ng 설치
Ubuntu 컴퓨터에서 터미널을 열고 다음을 실행합니다.
sudo apt-get install syslog-ng sudo apt-get install syslog-ng openssl
2. 서버 인증을 위해 Syslog 서버에 루트 인증 기관 설치
디렉터리 작성 및 키 생성
cd /etc/syslog-ng mkdir cert.d key.d ca.d cd cert.d openssl genrsa -out ca.key 2048 openssl req -new -x509 -key ca.key -out PROXY-SIGNING-CA.ca -days 730 # Copy key to the key.d folder cp ca.key ../key.d
지문 계산
명령을 실행하고 출력을 복사합니다.
openssl x509 -in PROXY-SIGNING-CA.ca -fingerprint -noout | awk -F "=" '{print $2}' | sed 's/://g' | tee fingerprint.txt
# 출력 예: 54F371C8EE2BFB06E2C2D0944245C288FBB07163
3. syslog-ng 서버 구성 파일 구성
syslog-ng 컨피그레이션 파일을 편집합니다.
sudo nano /etc/syslog-ng/syslog-ng.conf
컨피그레이션을 추가합니다.
source s_src { network( ip(0.0.0.0) port(6514) transport("tls") tls( key-file("/etc/syslog-ng/key.d/ca.key") cert-file("/etc/syslog-ng/cert.d/PROXY-SIGNING-CA.ca") peer-verify(optional-untrusted) ) ); }; destination remote { file("/var/log/syslog"); }; log { source(s_src); destination(remote); };
4. 서버 인증을 위해 Cisco IOS XE SD-WAN 장치에 루트 인증 기관 설치
CLI에서 구성
-
컨피그레이션 모드로 들어갑니다.
config-t
-
신뢰 지점을 구성합니다.
crypto pki trustpoint PROXY-SIGNING-CA enrollment url bootflash: revocation-check none rsakeypair PROXY-SIGNING-CA 2048 subject-name cn=proxy-signing-cert fqdn none fingerprint 54F371C8EE2BFB06E2C2D0944245C288FBB07163 >> The fingerprint configured was obtained from the fingerprint.txt file above commit
-
복사 프록시 서명 CA.ca 동일한 이름을 사용하여 syslog 서버에서 라우터 bootflash로 파일을 전송합니다.
-
신뢰 지점 인증:
crypto pki authenticate PROXY-SIGNING-CA
example:
Router#crypto pki authenticate PROXY-SIGNING-CA
Reading file from bootflash:PROXY-SIGNING-CA.ca
Certificate has the attributes:
Fingerprint MD5: 7A97B30B 2AE458FF D9E7D91F 66488DCF
Fingerprint SHA1: 21E0F09B B67B2E9D 706DBE69 856E5AA3 D39A268A
Trustpoint Fingerprint: 21E0F09B B67B2E9D 706DBE69 856E5AA3 D39A268A
Certificate validated - fingerprints matched.
Trustpoint CA certificate accepted.
-
신뢰 지점 등록:
crypto pki enroll PROXY-SIGNING-CA
example:
vm32#crypto pki enroll PROXY-SIGNING-CA
Start certificate enrollment ..
The subject name in the certificate will include: cn=proxy-signing-cert
The fully-qualified domain name will not be included in the certificate
Certificate request sent to file system
The 'show crypto pki certificate verbose PROXY-SIGNING-CA' commandwill show the fingerprint.
-
복사 프록시 서명 CA.req 파일을 라우터에서 syslog 서버로 전송합니다.
Syslog 서버에서 인증서 서명
openssl x509 -in PROXY-SIGNING-CA.req -req -CA PROXY-SIGNING-CA.ca -CAkey ca.key -out PROXY-SIGNING-CA.crt -CAcreateserial -extensions ca_extensions
-
생성된 파일 복사(PROXY-SIGNING-CA.crt)를 라우터 부트플래시에 연결합니다. scp 복사: 부트플래시:
-
인증서 가져오기:
crypto pki import PROXY-SIGNING-CA certificate
example:
Router# crypto pki import PROXY-SIGNING-CA certificate
% The fully-qualified domain name will not be included in the certificate
% Request to retrieve Certificate queued
구성 확인
show crypto pki trustpoint PROXY-SIGNING-CA status
example:
Router#show crypto pki trustpoint PROXY-SIGNING-CA status
Trustpoint PROXY-SIGNING-CA:
Issuing CA certificate configured:
Subject Name:
o=Internet Widgits Pty Ltd,st=Some-State,c=AU
Fingerprint MD5: 7A97B30B 2AE458FF D9E7D91F 66488DCF
Fingerprint SHA1: 21E0F09B B67B2E9D 706DBE69 856E5AA3 D39A268A
Router General Purpose certificate configured:
Subject Name:
cn=proxy-signing-cert
Fingerprint MD5: 140A1EAB FE945D56 D1A53855 FF361F3F
Fingerprint SHA1: ECA67413 9C102869 69F582A4 73E2B98C 80EFD6D5
Last enrollment status: Granted
State:
Keys generated ............. Yes (General Purpose, non-exportable)
Issuing CA authenticated ....... Yes
Certificate request(s) ..... Yes
5. Cisco IOS XE SD-WAN 라우터에서 TLS Syslog 서버 구성
다음 명령을 사용하여 syslog 서버를 구성합니다.
logging trap syslog-format rfc5424 logging source-interface GigabitEthernet0/0/0 logging tls-profile tls-profile logging host X.X.X.X transport tls profile tls-profile tls-version TLSv1.2
6. 확인
라우터의 로그 확인
show logging
Showing last 10 lines
Log Buffer (512000 bytes):
Apr 9 05:59:48.025: %DMI-5-CONFIG_I: R0/0: dmiauthd: Configured from NETCONF/RESTCONF by admin, transaction-id 189410
Apr 9 05:59:48.709: %DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'vmanage-admin' authenticated successfully from 1.1.1.1:58393 for netconf over ssh. External groups:
Apr 9 05:59:50.015: %LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to administratively down
Apr 9 05:59:51.016: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to down
Apr 9 05:59:52.242: %SYS-5-CONFIG_P: Configured programmatically by process iosp_dmiauthd_conn_100001_vty_100001 from console as admin on vty4294966494
Syslog 서버의 로그 확인
tail -f /var/log/syslog
root@server1:/etc/syslog-ng# tail -f /var/log/syslog
Apr 9 15:51:14 10.66.91.94 188 <189>1 2024-04-09T05:51:51.037Z - - - - - BOM%DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'vmanage-admin' authenticated successfully from 1.1.1.1:38032 for netconf over ssh. External groups:
Apr 9 15:59:10 10.66.91.94 177 <189>1 2024-04-09T05:59:47.463Z - - - - - BOM%SYS-5-CONFIG_P: Configured programmatically by process iosp_dmiauthd_conn_100001_vty_100001 from console as admin on vty4294966494
Apr 9 15:59:10 10.66.91.94 177 <189>1 2024-04-09T05:59:47.463Z - - - - - BOM%SYS-5-CONFIG_P: Configured programmatically by process iosp_dmiauthd_conn_100001_vty_100001 from console as admin on vty4294966494
Apr 9 15:59:10 10.66.91.94 143 <189>1 2024-04-09T05:59:47.463Z - - - - - BOM%DMI-5-CONFIG_I: R0/0: dmiauthd: Configured from NETCONF/RESTCONF by admin, transaction-id 189410
Apr 9 15:59:11 10.66.91.94 188 <189>1 2024-04-09T05:59:48.711Z - - - - - BOM%DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'vmanage-admin' authenticated successfully from 1.1.1.1:58393 for netconf over ssh. External groups:
Apr 9 15:59:13 10.66.91.94 133 <189>1 2024-04-09T05:59:50.016Z - - - - - BOM%LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to administratively down
Apr 9 15:59:13 10.66.91.94 137 <189>1 2024-04-09T05:59:50.016Z - - - - - BOM%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to down
Apr 9 15:59:15 10.66.91.94 177 <189>1 2024-04-09T05:59:52.242Z - - - - - BOM%SYS-5-CONFIG_P: Configured programmatically by process iosp_dmiauthd_conn_100001_vty_100001 from console as admin on vty4294966494
Apr 9 15:59:15 10.66.91.94 177 <189>1 2024-04-09T05:59:52.242Z - - - - - BOM%SYS-5-CONFIG_P: Configured programmatically by process iosp_dmiauthd_conn_100001_vty_100001 from console as admin on vty4294966494
Apr 9 15:59:18 10.66.91.94 188 <189>1 2024-04-09T05:59:55.286Z - - - - - BOM%DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'vmanage-admin' authenticated successfully from 1.1.1.1:34575 for netconf over ssh. External groups:
Apr 9 15:59:21 10.66.91.94 113 <187>1 2024-04-09T05:59:58.882Z - - - - - BOM%LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to up
Apr 9 15:59:21 10.66.91.94 135 <189>1 2024-04-09T05:59:59.882Z - - - - - BOM%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to up
Apr 9 15:59:28 10.66.91.94 177 <189>1 2024-04-09T06:00:05.536Z - - - - - BOM%SYS-5-CONFIG_P: Configured programmatically by process iosp_dmiauthd_conn_100001_vty_100001 from console as admin on vty4294966494
Apr 9 15:59:43 10.66.91.94 188 <189>1 2024-04-09T06:00:20.537Z - - - - - BOM%DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'vmanage-admin' authenticated successfully from 1.1.1.1:43530 for netconf over ssh. External groups:
패킷 캡처 스크린샷에서는 암호화된 통신이 발생하는 것을 볼 수 있습니다.
![Packet Capture Screenshot](/c/dam/en/us/support/docs/routers/xe-sd-wan-routers/222665-sdwan-cisco-ios-xe-tls-syslog-configurat-00.png)
ISR4331-branch-NEW_Branch#show logging
Trap logging: level informational, 6284 message lines logged
Logging to 10.66.91.170 (tls port 6514, audit disabled,
link up),
131 message lines logged,
0 message lines rate-limited,
0 message lines dropped-by-MD,
xml disabled, sequence number disabled
filtering disabled
tls-profile: tls-proile
Logging Source-Interface: VRF Name:
GigabitEthernet0/0/0
TLS Profiles:
Profile Name: tls-proile
Ciphersuites: Default
Trustpoint: Default
TLS version: TLSv1.2
다음을 확인합니다.
현재 이 설정에 사용 가능한 확인 절차는 없습니다.
문제 해결
현재 이 설정에 사용할 수 있는 특정 문제 해결 정보가 없습니다.