Juniper SRXシリーズファイアーウォールのフロー出力設定

NetFlow分析を行うには、NetFlowコレクタであるオンプレミスポーラーにフローを出力するように機器を設定する必要があります。オンプレミスポーラーは特定のポートに通信を行い、フローを受信します。オンプレミスポーラーのポート番号についてはこちら

次のコマンドを用いて、Juniper SRXシリーズサービスゲートウェイのjFlowを設定してください。

jFLow v5およびv8

forwarding-options {
sampling {
input {
family inet {
rate 1000;
run-length 9;
max-packets-per-second 7000;
}
}
output {
cflowd <destination address>{
port ;
source-address <source address>;
version <version number>;
no-local-dump;
autonomous-system-type origin;
}
}
}
}

firewall

filter Sample-FILTER {
term ALLOW-ANY {
then {
sample;
accept;

特定のインターフェースでパケットサンプリングを有効にするには、次のサンプル設定を行ってください。

interfaces {
ge-1/3/0 {
vlan-tagging;
unit 101 {
vlan-id 101;
family inet {
sampling {
input Sample-FILTER;
output Sample-FILTER;
}
address 206.80.253.26/25
}
}
}
}

jFLow v9

config t
set forwarding-options sampling input family inet rate 1000
set forwarding-options sampling input family inet run-length 9
set forwarding-options sampling input family inet max-packets-per-second 7000
set forwarding-options sampling output flow-server {NETFLOW_SERVER_IP} port {NETFLOW_SERVER_LISTENER_PORT}
set forwarding-options sampling output flow-server {NETFLOW_SERVER_IP} autonomous-system-type origin
set forwarding-options sampling output flow-server {NETFLOW_SERVER_IP} no-local-dump
set forwarding-options sampling output flow-server {NETFLOW_SERVER_IP} source-address {DEVICE_IP}
set forwarding-options sampling output flow-server {NETFLOW_SERVER_IP} version 5

set firewall filter Netflow-filter term allow-any then sample
set firewall filter Netflow-filter term allow-any then accept

ルーターやMSFCのグローバル設定モードに入り、フローを有効化したいインターフェースで次のコマンドを実行してください。

set interfaces {INTERFACE_NAME} unit 0 family inet sampling input
set interfaces {INTERFACE_NAME} unit 0 family inet sampling output
set interfaces {INTERFACE_NAME} unit 0 family inet address $Interface_IP

Juniper SRXフレキシブル

config t
set services flow-monitoring version9 template IPV4-JFLOW-TEMPLATE ipv4-template
set services flow-monitoring version9 template IPV4-JFLOW-TEMPLATE ipv4-template flow-active-timeout 60
set services flow-monitoring version9 template IPV4-JFLOW-TEMPLATE ipv4-template flow-inactive-timeout 60
set services flow-monitoring version9 template IPV4-JFLOW-TEMPLATE ipv4-template template-refresh-rate packets 480000

set services flow-monitoring version9 template IPV4-JFLOW-TEMPLATE ipv4-template template-refresh-rate second 60
set forwarding-options sampling input rate 100
set forwarding-options sampling input run-length 0
set forwarding-options sampling family inet output flow-server {NETFLOW_SERVER_IP} port {NETFLOW_SERVER_LISTENER_PORT}
set forwarding-options sampling family inet output flow-server {NETFLOW_SERVER_IP} autonomous-system-type origin
set forwarding-options sampling family inet output flow-server {NETFLOW_SERVER_IP} no-local-dump
set forwarding-options sampling family inet output flow-server {NETFLOW_SERVER_IP} version9 template IPV4-JFLOW-TEMPLATE
set forwarding-options sampling family inet output inline-jflow source-address {DEVICE_IP}

ルーターやMSFCのグローバル設定モードに入り、フローを有効化したいインターフェースで次のコマンドを実行してください。

set interfaces {INTERFACE_NAME} unit 0 family inet sampling input