Tip of the day: If you run multiple servers then consider using Remote includes to share configuration settings.

ASN

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

In UnrealIRCd 6.1.7 and later you can see the AS Number (ASN) to which an users IP address belongs. You can also take actions on it, such as banning or exempting by ASN or using the value in some other way.

What is an ASN

An Autonomous System (AS) is a group of IP networks run by one or more network operators with a single, clearly defined routing policy. This can be one big ISP, an enterprise that has two internet connections to different peers, or anything in-between. The AS Number (ASN) is the unique number that each AS gets. For example, the cloud provider OVH France has number 16276. See the wikipedia article if you want to read more about it.

An IP address can normally be traced back to an ASN. Some IPs cannot resolve to an ASN, think of LAN ranges like 192.168.* and the loopback interface 127.0.0.1. This is similar to how some IPs can never resolve to a country.

How to see ASNs

A list of AS numbers can be found at https://ftp.ripe.net/ripe/asnames/asn.txt

More easily, in UnrealIRCd 6.1.7 you can see the AS number and description (if you are IRCOp!) if you WHOIS the user or in the *** User connecting notice [asn: XYZ].

How to use ASNs

You can use it in Extended server bans (Or Extended bans) like: GLINE ~asn:64496 0 Sorry too much abuse from this ISP

In the config file you can use it in the Security-group block and Mask items. The mask item is used at many places: allow::mask, ban user::mask, require authentication::mask, oper::mask, except ban::mask, tld::mask, vhost::mask, link::incoming::mask, deny channel::mask, allow channel::mask, connthrottle::except, blacklist::except, set::restrict::commands::except, set::antimixedutf8::except and set::antirandom::except

You would use it like mask { asn 64496; } or mask { asn { 64496; 64497; 64498; } }

For example:

require authentication {
    mask { asn { 64496; 64497; 64498; } }
    reason "Too much abuse from this ISP. You are required to log in with an account using SASL.";
}

See also