getTrafficLog

Prev Next

Classic 환경에서 이용 가능합니다.

Secure Zone Firewall에서 발생한 트래픽 로그를 조회합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
POST /{type}/{zone}/getTrafficLog

요청 헤더

Secure Zone API에서 공통으로 사용하는 헤더에 대한 자세한 내용은 Secure Zone 요청 헤더를 참조해 주십시오.

요청 경로 파라미터

파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
type String Required Secure Zone에서 제공하는 방화벽 유형
  • szfw | psfw
    • szfw: Secure Zone Standard
    • psfw: Secure Zone Advanced
zone String Required Secure Zone을 구성한 존
  • kr1 | kr2
    • kr1: KR-1 존
    • kr2: KR-2 존

요청 바디

요청 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
action String Optional 허용 여부
  • allow | deny
countPerPage Integer Optional 페이지당 항목 수
  • 0 (기본값)
page Integer Optional 페이지 인덱스
  • 0 (기본값)
fromDate Date Required 조회 기간의 시작일
toDate Date Required 조회 기간의 종료일
timeZone String Optional 타임 존
  • +09:00 (기본값)
destinationIp String Optional 목적지의 IP 주소
port String Optional 목적지의 포트 번호
protocol String Optional 목적지의 프로토콜
sourceIp String Optional 출발지의 IP 주소

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request POST 'https://securezonefirewall.apigw.gov-ntruss.com/api/v2/szfw/kr2/getTrafficLog'
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-mbr_no: {User number}' \
--header 'Content-Type: application/json' \
--data '{
  "fromDate": "2024-07-01T00:32:14.953Z",
  "toDate": "2024-07-03T04:59:58.525Z"
}'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
action String - 요청 유형
returnCode Integer - 응답 코드
returnMessage String - 응답 메시지
totalCount Integer - 트래픽 로그의 총 개수
trafficLogList[] Array - 트래픽 로그의 정보
trafficLogList[].receiveDate Long - 로그 발생일(Unix timestamp)
trafficLogList[].sourceIp String - 출발지 IP 주소
trafficLogList[].sourceServerName String - 출발지 서버의 이름
trafficLogList[].destinationIp String - 목적지 IP 주소
trafficLogList[].destinationServerName String - 목적지 서버의 이름
trafficLogList[].protocol String - 목적지 프로토콜
trafficLogList[].service String - 서비스
trafficLogList[].port String - 목적지 포트 번호
trafficLogList[].action String - 허용 여부
  • allow | deny
trafficLogList[].policyName String - 정책 이름

응답 상태 코드

네이버 클라우드 플랫폼에서 공통으로 사용하는 응답 상태 코드에 대한 자세한 내용은 Ncloud API 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

{
    "action": "getTrafficLog",
    "returnCode": 0,
    "returnMessage": "success",
    "totalCount": 5,
    "trafficLogList": [
        {
            "receiveDate": 1719982292000,
            "sourceIp": "***.***.***.***",
            "sourceServerName": "",
            "destinationIp": "***.***.***.***",
            "destinationServerName": "sv-securezone",
            "protocol": "TCP",
            "service": "SSH",
            "port": "22",
            "action": "deny",
            "policyName": "Policy(Default Deny)"
        },
        {
            "receiveDate": 1719982286000,
            "sourceIp": "***.***.***.***",
            "sourceServerName": "",
            "destinationIp": "***.***.***.***",
            "destinationServerName": "sv-securezone",
            "protocol": "TCP",
            "service": "SSH",
            "port": "22",
            "action": "deny",
            "policyName": "Policy(Default Deny)"
        },
        {
            "receiveDate": 1719982282000,
            "sourceIp": "***.***.***.***",
            "sourceServerName": "",
            "destinationIp": "***.***.***.***",
            "destinationServerName": "sv-securezone",
            "protocol": "TCP",
            "service": "SSH",
            "port": "22",
            "action": "deny",
            "policyName": "Policy(Default Deny)"
        },
        {
            "receiveDate": 1719982281000,
            "sourceIp": "***.***.***.***",
            "sourceServerName": "",
            "destinationIp": "***.***.***.***",
            "destinationServerName": "sv-securezone",
            "protocol": "TCP",
            "service": "SSH",
            "port": "22",
            "action": "deny",
            "policyName": "Policy(Default Deny)"
        },
        {
            "receiveDate": 1719982279000,
            "sourceIp": "***.***.***.***",
            "sourceServerName": "",
            "destinationIp": "***.***.***.***",
            "destinationServerName": "sv-securezone",
            "protocol": "TCP",
            "service": "SSH",
            "port": "22",
            "action": "deny",
            "policyName": "Policy(Default Deny)"
        }
    ]
}