Categories: Tech

How to log traffic dropped by Juniper SRX firewalls

Prior to working with Juniper SRX’s my firewall experience was predominantly Check Point. Two nice features of Check Point firewalls are Smart Log and Smart View Tracker which both provide easy access to firewall log records. When I started using SRX’s one of my first questions was how do I get to view dropped traffic?

One of the easiest ways to do this is to use a ‘Default Deny’ template group. Unless explicitly allowed by a Security Policy all traffic is dropped by default, however this traffic isn’t logged. Using a default deny template group and applying it between all Security Zones is the way to get around this and log the traffic being dropped.

Create the Template:

set groups default-deny-template security policies from-zone <*> to-zone <*> policy defult-deny match source-address any
set groups default-deny-template security policies from-zone <*> to-zone <*> policy defult-deny match destination-address any
set groups default-deny-template security policies from-zone <*> to-zone <*> policy defult-deny match application any
set groups default-deny-template security policies from-zone <*> to-zone <*> policy defult-deny then deny
set groups default-deny-template security policies from-zone <*> to-zone <*> policy defult-deny then log session-init

Apply the Template:

set apply-groups default-deny-template

Configure Syslog:

set system syslog user * any emergency
set system syslog host 192.168.10.1 any any
set system syslog host 192.168.10.1 match RT_FLOW_SESSION_DENY

You can now fire up your trusty syslog server (you do use one right?) and view the records generated by the Default Deny template that match the regular expression RT_FLOW_SESSION_DENY.

I hope this has been a useful explanation.

Thanks for reading.

Rich

Follow Rich on Twitter

rssfeeds-admin

Share
Published by
rssfeeds-admin

Recent Posts

The 10 Most Anticipated TV Shows to Stream in May

We noted this last month, but we really mean it in May: Things are starting…

22 minutes ago

How 007 First Light’s Quips and Quick Wits Make Bond Stand Apart from Agent 47

One of key the reasons developer IO Interactive is an inspired choice for adapting Ian…

1 hour ago

Multiple Exim Mail Server Vulnerabilities Leads to Crash with Malicious DNS data

The Exim development team has released version 4.99.2 to address four newly discovered security vulnerabilities…

2 hours ago

Mortal Kombat (1995) Flashback Review

For a long time, Mortal Kombat’s 1995 live-action movie set the bar as far as…

2 hours ago

This website uses cookies.