Tip of the day: The Security article gives hands-on tips on how to deal with drone attacks, flooding, spammers, (D)DoS and more.

Reputation score

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

The reputation score of a user shows for how long a user (actually: IP address) has been "known" to your server(s). This distinction between high and low reputation users is used in different parts of UnrealIRCd to give higher reputation users less restrictions.

We first explain how reputation works and how to see or set it. At the end of this article, we explain where reputation is actually used, which is the most important part.

How reputation works

  • Every 5 minutes the reputation module will increase the score for all connected IP addresses by +1. If the user is authenticated to services then they receive an additional point, so +2 in total.
    • In UnrealIRCd 6.1.2 and later we will NOT increase the score for users who are not in any channels or only in channels with a member count less than 3 (by default). This is because drones/spammers often idled without joining any channels. This can be adjusted via set::reputation::score-bump-timer-minimum-channel-members.
  • If the user has not been online for 30 days then the reputation entry expires and is deleted. For very low reputation scores this may happen sooner, to keep the database small. For example reputation scores of less than 7 are already expired after 7 days.
  • The reputation score is capped at a maximum of 10000

Seeing reputation

An IRCOp can see the IP reputation score of...

  • In the "User connecting" server notice (snomask)
  • A user: WHOIS Nick
  • An IP address: REPUTATION 1.2.3.4
  • All users below a certain number: REPUTATION <10
  • All users in a channel: REPUTATION #channel
  • Via WHO for clients/bots/scripts, the WHOX R field: WHO * %cuhsnfmdaRr

Setting reputation

As mentioned in #How reputation works the reputation is adjusted automatically. If you want to set it manually, you can use the REPUTATION [nick|ip] [score] command. Setting reputation this way is possible in UnrealIRCd 6.1.2 and higher. If you lower a reputation, all servers need to be on 6.1.2 and higher, otherwise the reputation will not be properly synced and will on next reconnect likely be reset to the original high(er) value.

Where reputation is used

  • The Connthrottle module to block low reputation users in case of a drone attack
  • When restricting commands via set::restrict-commands
  • The Security-group block to define known-users and unknown-users
  • Indirectly in the ~security-group extban, eg: MODE #chan +b ~security-group:unknown-users to block low reputation and unidentified users