Skip to content

Commit ba9cc7d

Browse files
authored
Merge pull request #13 from widhalmt/fix-client-12
Fix mixup of client addresses
2 parents a2ea5f0 + a1e918e commit ba9cc7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

filter-50-secure-ssh.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ filter {
22
if [process][name] == "sshd" or [journald][process][name] == "sshd" {
33
if [message] =~ /^(Accepted|Failed)/ {
44
grok {
5-
match => ["message", "%{WORD:[ssh][auth][result]} %{WORD:[ssh][auth][method]} for (invalid user )?%{USERNAME:[user][name]} from %{IPORHOST:[client][address]} port %{NUMBER:[client][port]} %{NOTSPACE:[ssh][protocol]}(: %{GREEDYDATA:[ssh][signature]})?"]
5+
match => ["message", "%{WORD:[ssh][auth][result]} %{WORD:[ssh][auth][method]} for (invalid user )?%{USERNAME:[user][name]} from %{IPORHOST:[client][address]} port %{NUMBER:[client][port]} %{WORD:[ssh][protocol]}(: %{GREEDYDATA:[ssh][signature]})?"]
66
id => "ssh_login"
77
tag_on_failure => ["_grokparsefaillure","ssh_login_grok_failed"]
88
}
@@ -28,7 +28,7 @@ filter {
2828

2929
## Copy client.address to the matching field according to ECS ##
3030

31-
if [client][address] =~ /^\w/ {
31+
if [client][address] =~ /^[a-zA-Z]/ {
3232
if !("" in [client][domain]) {
3333
mutate {
3434
add_field => {

0 commit comments

Comments
 (0)