Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Firewall live log improvements #1788

Closed
StrikerTwo opened this issue Aug 26, 2017 · 8 comments
Closed

[Feature] Firewall live log improvements #1788

StrikerTwo opened this issue Aug 26, 2017 · 8 comments
Assignees
Labels
feature Adding new functionality
Milestone

Comments

@StrikerTwo
Copy link

Up to now I always used Sophos UTM (free edition) as firewall/router VMs, because they were one of the first to natively support Hyper-V. I am now switching to OPNsense.

One thing I miss is Sophos UTM's live firewall log (see screenshot). I know there is the Dynamic View in OPNsense, but IMHO UTM's version is much more clearly laid out (although the look is a bit old-fashioned) and functional in order to see what's going on.

2017-08-26 14_02_09-clipboard

What I would like to see in OPNsense:

  • Live view opened directly from the rules view in a new browser window, so I can change firewall rules and see the effect immediately without switching back and forth
  • Color coding of the whole row for pass (green), reject/drop (red) - that way you don't have to find and parse the symbol to see what's going on (but keep the symbol for colorblind people)
  • Display the description of the rule that caused the action (not just the number like @14)
  • Filter for the live view (doesn't have to be the full blown multi-field filter from Normal View - a simple text filter would be sufficient)
  • show more than 50 events and let me scroll back to old ones (browser should be good for at least 1000 lines)
  • Reverse the sort order (optionally) so that newest events are shown at the bottom (but autoscroll there)
@AdSchellevis
Copy link
Member

almost finished, a small teaser....
image

image

It has some limitations, the most important one is the label will only be valid for the running configuration, the log data doesn't contain a reference to the rule other then it's rule number (which may change after load).

@fabianfrz
Copy link
Member

@AdSchellevis for CI it would be better if the table would match the rest of the pages (only the play button is green). Also the (i) could be a button or removed if the line is clickable.

For future reasons:
Array fields in the model have an UUID which can be used in the firewall and the view can restore the original values. This way the displayed value would always match.

@fichtner
Copy link
Member

fichtner commented Nov 3, 2017 via email

@AdSchellevis
Copy link
Member

It has some rough edges, but it's almost finished. "Firewall Live Log" sounds good, I will replace the caption. The colouring might need some work, probably a bit too bright at the moment, the different table styling is intentional (our default tables are a bit to large for this purpose).
Replacing the (i) with a button might help increase visibility, I'll try that out later.

The uuid's are indeed practical, but since not stored in pf itself, they won't help us here (but we could consider changing the filterlog part to capture some more info which isn't available at kernel level).... Not for now, maybe later.

AdSchellevis added a commit that referenced this issue Nov 4, 2017
@StrikerTwo
Copy link
Author

Wow, great work! I like it already.

AdSchellevis added a commit that referenced this issue Nov 5, 2017
@AdSchellevis
Copy link
Member

image

We still need cleanups to remove the old dynamic view and related legacy code, but the functionality should work now.
I've brightened the colours a bit more to increase text contrast.

In case anybody want to test the new functionality, use the following commands to replace the old dynamic view for the new live firewall log view:

opnsense-patch d567d90
curl -o /usr/local/opnsense/site-python/log_helper.py https://raw.githubusercontent.com/opnsense/core/master/src/opnsense/site-python/log_helper.py 

opnsense-patch 97fb966 a0cb9c9 3765909 7c8f799 3b23174 d69f503 694e1a9 7089383 eeb7cc0  e580afe 64663a9 ca79e25  eedf24c c62616e  

service configd restart

(I had some issues pulling log_helper in via opnsense-patch, hence the curl)

@fichtner
Copy link
Member

All done, thanks!

@StrikerTwo
Copy link
Author

Having just upgraded my first OPNsense box I just wanted to say thank you. I love the new live log ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

4 participants