Skip to content

Add IP address to auth log output #12562

@adamboutcher

Description

@adamboutcher

NetBox version

v3.5.1

Feature type

Change to existing functionality

Proposed functionality

Change the Netbox logger (netbox.auth.login) for authentication failure to include the remote IP address, this.

Use case

The change would allow for parsing of the logs easier to detect brute force authentication attacks (i.e. Fail2Ban etc).

May 11 12:58:20 netbox NetBox: level=INFO,logger=netbox.auth.login,msg=Failed login attempt for username: test-fail
to
May 11 12:58:20 netbox NetBox: level=INFO,logger=netbox.auth.login,msg=Failed login attempt for username: test-fail from x.y.1.1

Database changes

NA.

External dependencies

This may have to use the X-Real-IP header?

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions