Project

General

Profile

Actions

Feature #5889

closed

Log of locked out IPs

Added by Alex Vergilis over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Rules / NAT
Target version:
-
Start date:
02/13/2016
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

Feature request to log IP addresses that are placed into lockout groups like sshlockout and virusprot.

It would aid in troubleshooting and analyzing potential intrusion attempts.

Actions #1

Updated by BBcan177 . over 9 years ago

You could send your pfSense syslogs to a remote syslog for long-term storage/analysis.

Actions #2

Updated by Alex Vergilis over 9 years ago

That function is performed already. The issue is that the IP address is not logged by pfsense. There's no data to send.

Ideally it should log the IP and preferably the rule that blocked it.

Actions #3

Updated by BBcan177 . over 9 years ago

In 2.3, you can edit /etc/inc/filter.inc and force it to log. Currently, its only logging if the "Default logging" is enabled in System Log: Settings.

Original:

3204 if ($webConfiguratorlockoutport) {
3205 $ipfrules .= "block in {$log['block']} quick proto tcp from <webConfiguratorlockout> to (self) port {$webConfiguratorlockoutport} tracker {$increment_tracker($tracker)} label \"webConfiguratorlockout\"\n";

New:

3204 if ($webConfiguratorlockoutport) {
3205 $ipfrules .= "block in log quick proto tcp from <webConfiguratorlockout> to (self) port {$webConfiguratorlockoutport} tracker {$increment_tracker($tracker)} label \"webConfiguratorlockout\"\n";

SSHlockout line: 3187
Virusprot line: 3205

Then execute a "Filter Reload"

In 2.2.x:

sshlockout: Line: 2917
webConfiguratorlockout: Line: 2933
virusprot: Line: 2942

Not sure if the Devs would want to force this to log or add an option in System Log: Settings to enable/disable this logging...
I would think it should be forced to log all the time.

Actions #4

Updated by Chris Buechler over 9 years ago

  • Status changed from New to Closed

IPs that get locked out are logged to the system log at the time of lockout. The block rule that blocks additional attempts logs by default and as long as default block logging is left enabled. It shouldn't always be forced, there can be situations where people don't want that to log. It's fine as is.

Actions #5

Updated by Alex Vergilis over 9 years ago

Chris,

Enabling default logging would log the entire internet attempting access the default block rules, instead of specific hosts and tcp port rates. It will be more difficult to log, collect, store, search, and find relevant information if default logging is enabled.

I will be more than happy to pay you for the work to include this functionality.

Actions

Also available in: Atom PDF