目次
deactivate(無効化)しているPolicyを確認する方法
別記事で暫定的にポリシーを無効化する設定をまとめました。deactivate(無効化)されているポリシーを確認した後に、activate(有効化)する手順も別記事にまとめております。
Juniper SRXでdeactivate(無効化)しているPolicyを確認する方法をまとめます。
複数のポリシーを作成しており一部は有効化、一部は無効化している状況で、無効化しているポリシーだけを確認する際に役立ったコマンドです。
【前提】複数のポリシーが設定されている
今回の例の場合では、test_deny2が有効化されており、test_deny1とtest_deny3は無効化されているとします。
set security policies from-zone untrust to-zone trust policy test_deny match source-address any
set security policies from-zone untrust to-zone trust policy test_deny match destination-address any
set security policies from-zone untrust to-zone trust policy test_deny match application any
set security policies from-zone untrust to-zone trust policy test_deny then deny
deactivate security policies from-zone untrust to-zone trust policy test_deny
set security policies from-zone untrust to-zone trust policy test_deny2 match source-address any
set security policies from-zone untrust to-zone trust policy test_deny2 match destination-address any
set security policies from-zone untrust to-zone trust policy test_deny2 match application any
set security policies from-zone untrust to-zone trust policy test_deny2 then deny
set security policies from-zone untrust to-zone trust policy test_deny3 match source-address any
set security policies from-zone untrust to-zone trust policy test_deny3 match destination-address any
set security policies from-zone untrust to-zone trust policy test_deny3 match application any
set security policies from-zone untrust to-zone trust policy test_deny3 then deny
deactivate security policies from-zone untrust to-zone trust policy test_deny3
deactivateしている対象ポリシーの確認コマンド
以下コマンドで「 inactive」と表示されているポリシーのみを抽出して確認できます。
jcluser@vSRX-addr-0# show | match inactive
inactive: policy test_deny {
inactive: policy test_deny3 {
[edit]
set形式で表示させると「inactive」ではなく、「deactivate」と表示されます。
show | display set | match deactivate コマンドで「deactivate」と表示されているポリシーのみを抽出して確認できます。
jcluser@vSRX-addr-0# show | display set | match deactivate
deactivate security policies from-zone untrust to-zone trust policy test_deny
deactivate security policies from-zone untrust to-zone trust policy test_deny3
[edit]
まとめ
最後にまとめになります!
- deactivate(無効化)しているPolicyをソートして確認するコマンドは以下の通り
- show | match inactive
- show | display set | match deactivate
以上!