Anope Tutorials

From IRC Wiki
Jump to navigation Jump to search

See Anope.

Anope is a services package which was first released in 2003 and is based on Epona and contains common services bots such as OperServ, NickServ, ChanServ, HostServ, BotServ, MemoServ

Anope Commands

Defcon

It is very easy to activate defcon in Anope. One command is enough to activate it. There are 5 levels of Defcon, however these can vary as per configuration file, the standard defcon levels are as follows:

5 - Defcon is running normal
4 - No channel/nick registration, no changes to MLOCK and use reduced session limit
3 - Same as 4, but service will force set modes on channels.
2 - Same as 3, but services will ignore everyone accept for opers.
1 - Same as 2, but all incoming connections will be akilled.

You can edit the Defcon system by making a few changes to the services.conf. However for the most part the default settings work perfectly. My recommendations are:


  • Make sure the session limit is reasonable when defcon is activated:
DefConSessionLimit 2

  • Make sure you increase the default akill time limit, it is default at 5, however this is useless if you need to have defcon activated for longer than 5 minutes.
DefConAkillExpire 10m
  • You will also want the default defcon kill message to be changed to something that is useful to the user. Maybe include the network site or a contact email address so users can ask about what is going on.
DefConAkillReason "This network is currently not accepting connections, please try again later. visit our website http://www.mywebsite.com or email admin@mynetwork.com for more details."

  • The channel modes are critical in ensuring defcon is used to its full potential, it is default that channel mode +R is incoorperated, however I would use +M aswell to prevent unregistered nicks from talking.
DefConChanModes "+MR"

  • The defcon timeout is critical. It is default at 15 minutes. You don't want it set too high because if you forget to return defcon to level 5, users may not be able to connect, join channels or talk. But you don't want it to low, so it sets defcon to 5 during an attack. What I recommend is.
DefConTimeOut 20m

  • When defcon is activated you want your users to be notified, so they don't get worried if there channels mode changes unexpectedly. You can do this by enabling Globalondefcon. And then defining sensible messages to be sent to users on defcon activation.
GlobalOnDefcon
GlobalOnDefconMore
DefconMessage "Due to an attack, Defcon has been activated, some services may not work during this time."
DefConOffMessage "Services are now back to normal, sorry for any inconvenience"

Modules

Anope has many modules that can be loaded to extend its functionality, and make it more useful for the opers and users. A few modules I recommend are:

  • os_notinchanlist - Shows a list of all users not in channels, then allows you to kill or join the users to a channel.
  • os_access_levels - Gives you total control of oper commands, so you can make sure only the most knowledgeable opers can access certain commands.
  • os_massmode - Allows you to change channel modes for each channel on the network, useful during botnets and other malicious activity.
  • cs_autovoice - Makes ChanServ voice users on join, rather than making a seperate bot do it. Can be set to all nicks or registered only.

Adding modules

Adding modules to Anope is easy, just follow this step by step guide.

  • Obviously you need anope configured and running properly.
  • Copy .c file of the module you to load into the anope.x/src/modules directory.
  • Check the read me or install documents that came with the module for any configuration that may need to be added to the services.conf.
  • Use cd to go back to the anope.x root directory
  • Enter the command: make modules.
  • If make modules worked successfully a .so file will appear in the anope.x/src/modules directory, and you can now finish the installation.
  • Enter the command: make install
  • This will finish the installation, you should then be able to load the modules via OperServ

Services Conf

A good services.conf takes at least an hour to configure properly, and to the exact needs of your net. However for testing purposes or whatever else, you can make Anope connect to your network by changing just four parameters in the conf.


  • IRC module, eg:
    IRCDModule "inspircd20"

  • The remote server to connect to, eg:
    RemoteServer    127.0.0.1 6667 "mypass"

  • The service roots need to be set and uncommented, eg:
    ServicesRoot   "dengel anope"

  • The servername, eg:
    ServerName  "services.localhost.net"