ssh-sentryd.8 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .\" Copyright (c) 2020 Markus Hennecke <markus-hennecke@markus-hennecke.de>
  2. .\"
  3. .\" Permission to use, copy, modify, and distribute this software for any
  4. .\" purpose with or without fee is hereby granted, provided that the above
  5. .\" copyright notice and this permission notice appear in all copies.
  6. .\"
  7. .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. .\"
  15. .Dd $Mdocdate: July 12 2020 $
  16. .Dt SSH-SENTRYD 8
  17. .Os
  18. .Sh NAME
  19. .Nm ssh-sentryd
  20. .Nd daemon watching for failed authentications from
  21. .Xr sshd 8
  22. in
  23. .Pa /var/log/authlog ,
  24. adding IPs trying to login with invalid user names to the
  25. .Xr pf 4
  26. table
  27. .Qq blacklist .
  28. .Sh SYNOPSIS
  29. .Nm
  30. .Bk -words
  31. .Op Fl dv
  32. .Ek
  33. .Sh DESCRIPTION
  34. The
  35. .Nm
  36. daemon watches the
  37. .Xr sshd 8
  38. log entries in
  39. .Pa /var/log/authlog
  40. and adds IPs trying to login with invalid user names to the
  41. .Xr pf 4
  42. table
  43. .Qa blacklist .
  44. .Pp
  45. The options are as follows:
  46. .Bl -tag -width "-d"
  47. .It Fl d
  48. Do not daemonize.
  49. If this option is specified,
  50. .Nm
  51. will run in the foreground and log to
  52. .Em stderr .
  53. .It Fl v
  54. This option allows
  55. .Nm
  56. to send DEBUG priority messages to syslog.
  57. .El
  58. .Pp
  59. .Nm
  60. watches for new log lines in
  61. .Pa /var/log/authlog
  62. matching log entries starting with one of:
  63. .Bl -tag -width "Failed password for invalid user from" -compact
  64. .It Li Failed password for invalid user from
  65. .It Li Failed password for root from
  66. .El
  67. .
  68. The IP address following one of the above log lines is then added to the
  69. .Xr pf 4
  70. table
  71. .Qq blacklist .
  72. .Pp
  73. If the log file
  74. .Pa /var/log/authlog
  75. is rotated it is reopened.
  76. .Sh SEE ALSO
  77. .Xr pf 4
  78. .Xr sshd 8