Sunday, March 27, 2016

setup Internet Relay Chat, irc server using ngircd

1- installation
$ sudo apt-get install ngircd

2- update name server to point to ip of irc server in A record or we just use /etc/hosts for quick and dirty, our irc name will be irc.private.org

3- modify the ngircd configure file (/etc/ngircd/ngircd.conf) to the following,
[Global]
    Name = irc.private.org
    AdminInfo1 = Debian User
    AdminInfo2 = Debian City
    AdminEMail = irc@irc.example.com
    Info = Yet another IRC Server running on Debian GNU/Linux
    ;Listen = 127.0.0.1,192.168.0.1
    MotdFile = /etc/ngircd/ngircd.motd
    ;MotdPhrase = "Hello. This is the Debian default MOTD sentence"
    ;Password = wealllikedebian
    PidFile = /var/run/ngircd/ngircd.pid
    ;Ports = 6667, 6668, 6669
    ServerGID = irc
    ServerUID = irc
[Limits]
    ConnectRetry = 60
    ;IdleTimeout = 0
    MaxConnections = 500
    MaxConnectionsIP = 10
    MaxJoins = 10
    ;MaxNickLength = 9
    ;MaxListSize = 100
    PingTimeout = 120
    PongTimeout = 20
[Options]
    ;AllowedChannelTypes = #&+
    ;AllowRemoteOper = no
    ;ChrootDir = /var/empty
    ;CloakHost = cloaked.host
    ;CloakHostModeX = cloaked.user
    ;CloakHostSalt = abcdefghijklmnopqrstuvwxyz
    ;CloakUserToNick = yes
    ;ConnectIPv6 = yes
    ;ConnectIPv4 = yes
    ;DefaultUserModes = i
    ;DNS = yes
    ;Ident = yes
    ;IncludeDir = /etc/ngircd/conf.d
    ;MorePrivacy = no
    ;NoticeAuth = no
    OperCanUseMode = yes
    ;OperChanPAutoOp = yes
    ;OperServerMode = no
    ;PAM = yes
    ;PAMIsOptional = no
    ;RequireAuthPing = no
    ;ScrubCTCP = no
    SyslogFacility = local1
    ;WebircPassword = xyz
[SSL]
    ;CertFile = /etc/ssl/certs/server.crt
    ;CipherList = HIGH:!aNULL:@STRENGTH
    CipherList = SECURE128
    ;DHFile = /etc/ngircd/dhparams.pem
    ;KeyFile = /etc/ssl/private/server.key
    ;KeyFilePassword = secret
    ;Ports = 6697, 9999
[Operator]
    ;Name = TheOper
    ;Password = ThePwd
    ;Mask = *!ident@somewhere.example.com
[Operator]
[Server]
    ;Name = irc2.example.net
    ;Host = connect-to-host.example.net
    ;Bind = 10.0.0.1
    ;Port = 6667
    ;MyPassword = MySecret
    ;PeerPassword = PeerSecret
    ;Group = 123
    ;Passive = no
    ;SSLConnect = yes
    ;ServiceMask = *Serv,Global
[Server]
[Channel]
    ;Name = #ngircd
    ;Topic = Our ngircd testing channel
    ;Modes = tnk
    ;Key = Secret
    ;KeyFile = /etc/ngircd/#chan.key
    ;MaxUsers = 23
[Channel]


4- restart ngircd service
$ sudo service ngircd restart

-- now it is ready to use ---
below two client join room1 chat room.


No comments:

Post a Comment