Tampilkan postingan dengan label IRC. Tampilkan semua postingan
Tampilkan postingan dengan label IRC. Tampilkan semua postingan

Minggu, 21 September 2008

IRC server Hybrid

IRC server

referensi :

http://www.irchelp.org/irchelp/ircd/
http://ircd-hybrid.com

IRC ( Internet Relay Chat ) ada lah aplikasi yang dikembangkan untuk keperluan komunikasi antar komputer pada jaringan. contoh jaringan IRC yang terkenal adalah Dal.net. di Indonesia pun telah berdiri jaringan IRC yaitu : AllNetwork atau Anet Network.

server aplikasi IRC ini menggunakan :
- slackware 11.0 kernel 2.4.33
- ircd-hybrid-7.2.2

selain IRC-hybrid yang dikembangkan EfNet ( Eris Free Network ) salah satu network tertua di dunia, kita bisa menggunakan bahamut, versi bahamut terakhir adalah bahamut-1.8.4.

————INSTALASI————–

- unpack / extract package ircd-hybrid anda,
root@IARD:~#tar -xzvf ircd-hybrid-7.2.2.tar.gz
- masuk ke direktori hasil extract
- lakukan 3 jurus ampuh, seperti biasa, hehehe…….
root@IARD:~#./configure
root@IARD:~#make
root@IARD:~#make install
secara default, ircd akan terinstall di /usr/local/ircd, kita bisa pake –prefix saat configure untuk instalasi di direktori lain.

kita juga bisa pake file config.h yang dapat di ambil di situs ircd-hybrid, untuk memudahkan saat kompilasi. masukkan config.h ke dalam [direktori-ircd-hybrid]/include/

setelah selesai, saatnya langkah paling penting, yaitu konfigurasi

—————-KONFIGURASI———————

masuk ke direktori ircd lo, file konfigurasi gw ada di /usr/local/ircd/etc/. cari example.conf, itu adalah contoh konfigurasi, edit file tersebut dengan editor kesukaan lo, gw pake pico. hal2 penting yang perlu di edit cuma :

-blok server info
-blok admin
-blok listen
-blok operator ( optional )
-blok connect
-blok listen

lainnya bisa di biarkan secara default. dan jangan lupa baris ini :

/* REMOVE ME. The following line checks you’ve been reading. */
havent_read_conf = 1;

gara2 ini, pas jalanin server jadi error, dengan pesan di log :


[2007/1/25 06.26] You haven’t read your config file properly.

[2007/1/25 06.26] There is a line in the example conf that will kill your server if not removed.

[2007/1/25 06.26] Consider actually reading/editing the conf file, and removing this line.

hehehehehe, sialan banget, gara2 1 line gak penting itu, server jadi kacau, gw ketawa ngakak waktu taunya…. hihihihihi…….

setelah selesai. masi di direktori ircd tadi, jalankan ./bin/ircd. jika server berjalan dengan sukses, maka akan ada pesan :

ircd: version hybrid-7.2.2
ircd: pid 16530
ircd: running in background mode from /usr/local/ircd

oh ya, ircd tidak bisa dijalankan sebagai root, oleh karena itu, kita harus membuat user dengan priviledge biasa untuk menjalankan ircd, otomatis kita juga harus mengganti direktori dan seluruh file permission /usr/local/ircd kepada user tersebut.

kalo udah, silakan server tersebut di test. dengan masuk menggunakan mirc, xchat, kirsc, ato apapun program chatting, bebas aja koq.

voila!!!

kalo uda sukses masuk, silakan bikin channel. hehehe, n selamat chatting.
tambahan : MOTD ( Message Of The Day ), file konfigurasinya ada di [direktori-ircd-hybrid]/etc/ircd.motd

di MOTD, lo bisa tulis apapun sebagai penyambut user yang baru masuk server.

source : raikaze blog

Service Pada IRC

Service Pada IRC

lanjutannya nih, setelah IRC server kita jadi, masa cuma jadi tempat ngobrol antar user doank di channel?? gak banget……..

kasi lah service2 plus - plus yang bisa memuaskan para user di irc server kita, hehehe…….. misalnya : chanserv, nickserv, dan lain2….

disini gw pake hybserv, biar sinkron aja ama irc-hybrid, sebenernya gak masalah sih, lo juga bisa pake epona kalo mau, ato hybserv di tanem ke bahamut, it’s not problem, terserah lo semua.

seperti biasa, extract paket hybserv lo,
-root@IARD:~#tar -xzvf hybserv-1.9.2.tar.gz

masuk ke direktorinya, trus, 3 jurus ampuh lo…
-root@IARD:~#./configure
-root@IARD:~#make
-root@IARD:~#make install

secara default ada di /usr/local/hybserv, tapi gw pake prefix, jadi install nya di 1 folder ama ircd, jadi di /usr/local/ircd/hybrid, biar gw kagak bingung ajah… hehehe……

abis itu, konfigurasi deh, edit file hybserv.conf, baris2 yang penting cuma ini :

file ircd.conf ~ irc-hybrid 7 :

connect {
name = "irc.test.net";
host = "1.2.3.4";
send_password = "password";
accept_password = "password";
compressed = no;
hub_mask = "*";
class = "server";
};

nah, samakan ircd.conf nya dengan hybserv.conf

S:password:irc.test.net:6667
N:services.test.net.:test Hybrid services

nah, selebihnya bisa di baca di konfignya, misalnya

A : ~ line ini untuk admin
S : ~ line server
C : ~ line channel, untuk diawasi operserv
O : ~ line operator
dan lain - lain, silahkan aja baca sendiri, hihihii………

hybserv menyediakan beberapa servis, yaitu :
- chanserv : servis untuk chanel, disini kita bisa register channel, drop, dan lain2
- nickserv : servis untuk nickname, bisa buat register nick kita
- operserv : servis operator, untuk menjaga channel dan memberikan OP kepada founder channel
- statserv : servis statistik irc
- Memoserv : servis untuk pengiriman pesan dari user ke user, baik user penerima sedang online atau tidak.
- seenserv : servis pencarian user, apakah dia sedang online atau tidak
- helpserv : servis help untuk semua servis….halah……hehehehe……
- globalserv : servis pengiriman pesan dari admin untuk seluruh user

untuk konfigurasi detail servis2 ini, silahkan lo edit setting.conf, keterangannya uda cukup lengkap, jadi silahkan baca sendiri, hehehehe…….

kalo uda selesai konfig sana sini, masi di direktori yang sama, /usr/local/ircd/hybserv, jalankan :

irc@IARD:~$./hybserv

note : seperti irc, hybserv tidak bisa di jalankan sebagai root, jadi jangan lupa ganti kepemilikan dan akses direktori.

sekarang lo buka mirc, xchat, kirsc, ato apalah program chatting, trus connect ke server yang uda lo buat, trus, jalanin salah satu untuk ngecek, misalnya

/msg chanserv help
/msg nickserv help

kalo ada berarti service lo uda jalan.


sumber : raikaze blog :)

how to install sBNC

Berikut langkah singkat install sBNC di shell :

login ke shell kamu :

ketik

$ wget http://mirror.shroudbox.net/sbnc-current.tar.gz

$ tar xvfz wget sbnc-current.tar.gz

$ cd sbnc-1.1

$ ./configure

$ gmake

$ gmake install

$ cd ~/sbnc

$ ./conftool

shroudBNC1.1 $Revision: 371 $ - an object-oriented IRC bouncer
*** configuration generator

This utility will automatically generate a suitable configuration
for you once it has asked you some questions.
1. Which port should the bouncer listen on? [9000] 2222
2. What should the first user's name be? aley
3. Please enter a password for the first user: aleyxxx
Writing config...

ket :

  1. 2222 adalah port yang akan kita gunakan

  2. aley adalah ident sBNC

  3. aleyxxx adalah password pertama kali run sBNC

Selanjutnya ketik :

$ ./sbnc

shroudBNC loader
Loading shroudBNC from ./sbnc.so
Tue Aug 19 07:51:51 2008 Log system initialized.
shroudBNC1.1 $Revision: 371 $ - an object-oriented IRC bouncer
Tue Aug 19 07:51:51 2008 Created main listener.
Tue Aug 19 07:51:51 2008 Starting main loop.
Daemonizing... DONE

Sudah Cukup Install BNCnya tinggal di run aza di mIRC.

Buka mIRC login dengan server shell kamu :

misal

server : host.serv2.org

port : 2222

ident : aley

password : aleyxxx

[14:49] * Connecting to host.serv2.org (2222)
-
[14:49] -Notice- *** shroudBNC1.1 $Revision: 371 $
-
[14:49] -Notice- *** Looking up your hostname
-
[14:49] -Notice- *** Failed to resolve your host. Using IP address instead (98.2.56.211)

ada PM dari -sBNC (Contoh )

[14:49] <-sBNC> You haven't set a server yet. Use /sbnc set server to do that now.

Artinya kita disuruh set server dan port. Krna kita menggunakan shell, maka kita juga hrus set vhostnya supaya tidak G-lined. Contoh set :

set realname mamet << u/ set realname BNC. Jika tidak di set nama BNCmu "shroudBNC user"

set vhost 69.42.215.130 << u/ set publik vhost

set server irc.quakenet.org << u/ set server BNC

<-sBNC> Done.

<-sBNC> Scheduled reconnect in 88 seconds.
<-sBNC> Trying to reconnect to irc.quakenet.org:6667
<-sBNC> Trying to reconnect to irc.quakenet.org:6667 for mamet
<-sBNC> Connection initialized. Waiting for response...

<-sBNC> Connected to an IRC server.

Building Your Own IRC Server with Services

This tutorial will cover the basic setup of an Unreal IRC server with Anope services. At this time, the latest version of Unreal is 3.2.5, while Anope has last released version 1.7.17 of IRC services. Before continuing, you should check whether newer versions of these packages are available, because - in most of the cases - newer = better.
Let's get started.


NOTE: Before you start:
- You should first change dir (cd) to the location you want them to be installed in (/opt for example)
- You should create a subdomain which will be accessible from the Internet (eg: irc.yourdomain.com). If you don't have a domain.com, feel free to use a DNS subdomain service such as afraid.org, which is free. There, create what ever subdomain you want, but keep in mind to use the IP address for the Linux box you are installing IRCD on. Moreover, the IP address used there MUST be accessible from the Internet (so don't use the LAN IPs as the subdomain address).
- If you intent to enable SSL support, you will need to have OpenSSL and Kerberos5 installed correctly.
- Unfortunately, the CODE boxes don't show spaces which are crucial to both unrealircd and services config files. You will have to pay a little bit more attention.

- Download the latest source packages:
■ Click HERE for UnrealIRCD
■ Click HERE for Anope Services.

- Decompress them (x.x.x is the latest version number):
CODE
tar xfz Unrealx.x.x.tar.gz
tar xfz anope-x.x.x.tar.gz


Installing and Configuring UnrealIRCD

- Compile UnrealIRCD (x.x is the latest version number):
CODE
cd Unrealx.x
./Config

■ Answers you should use during the install process:
CODE
anti-spoof protection? No
directory with configuration files? hit enter
path to ircd binary? hit enter
hub or leaf? Hub
hostname? Type the subdomain created earlier
default permissions? 0600
SSL support? No (or Yes if you are a security addict)
IPv6 support? No
enable ziplinks? No (unless you're linking with another IRCD)
enable remote includes? No (again, unless you're linking)
enable prefixes? Yes (totally up to you)
listen backlog? 5 is fine, hit enter
nickname history? 2000 is fine, hit enter
max
SendQ length? hit enter
buffer pools? hit enter
file descriptors? hit enter
more parameters? hit enter

- Type make to complete the compile process
- Copy the example configuration file:

CODE
cp doc/example.conf unrealircd.conf

- Open unrealircd.conf with your favorite text editor.
NOTE:
- Every variable in this configuration file is explained in detail. There's no point for me to explain each of them all over again so I'll go only through the most important ones. Do NOT modify other variables unless you know what you're doing.
- Lines that start with # are my comments so you don't have to add them to the config file.
CODE
/* FOR *NIX, uncomment the following 2lines: */
loadmodule "src/modules/commands.so";
loadmodule "src/modules/cloak.so";

# Set your IRCD info:
CODE
me
{
name "irc.yourdomain.com";
info "your IRC network name";
numeric 1;
};

# Show users you're the admin
CODE
admin {
"Your Name";
"Your Nickname";
"your@email.addr";
};

# Add an O:Line for yourself
# You can edit the one already there
# O:Lines define the IRCops
CODE
oper YourNickHere {
class clients;
from {
userhost *@*;
};
password "YourPassHere";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
g lobal;
};
};

# Add a C/N Line for IRC Services
# Don't edit the link block already there.
# C/N Lines allow other IRCDs or IRC Services to link with you
CODE
link services.yourdomain.com
{
username *;
hostname 127.0.0.1;
bind-ip *;
port 7029;
hub *;
password-connect "services";
password-receive "services";
class servers;
options {
};
};

# Comment this out with /* */
CODE
/*
link hub.mynet.com
[..etc..]
options {
/* Note: You should not use autoconnect when linking services */
autoconnect;
ssl;
zip;
};
};
*/

# Add the U:Line for the IRC Services
# You can edit the ulines block already there
CODE
ulines {
services.yourdomain.com;
stats.yourdomain.com;
};

# Comment this out with /* */
CODE
/*
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
*/

# Network configuration is the most important part
# You can use the block already there
CODE
* Network configuration */
set {
network-name "YourNetworkNameHere";
default-server "irc.yourdomain.com";
services-server "services.yourdomain.com";
stats-server "stats.yourdomain.com";
help-channel "#help";
hiddenhost-prefix "hidden";
/* prefix-quit "no"; */
/* Cloak keys should be the same at all servers on the network.
/* [..etc..]
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"90jioIOjhiUIOH877h87UGU898hgF";
"IOjiojiio8990UHUHij89KJBBKU898";
};
/* on-oper host */
hosts {
local "locop.yourdomain.com";
global "ircop.yourdomain.com";
coadmin "coadmin.yourdomain.com";
admin "admin.yourdomain.com";
servicesadmin "csops.yourdomain.com";
netadmin "netadmin.yourdomain.com";
host-on-oper-up "no";
};
};

# Server configuration
# You can edit the block already there
CODE
/* Server specific configuration */

set {
kline-address "VALID.mail@address.here";
auto-join "#lobby";
modes-on-connect " ixw";
modes-on-oper " xwgs";
oper-auto-join "#opers";
dns {
nameserver Your.DNS.IP.Here;
timeout 2s;
retries 2;
};

- Test your new IRCD server by typing:
CODE
./unreal start

- If you get some warning messages, it's safe to ignore them. If you get error messages, you'll have to get to the bottom of them, alone. Otherwise, if Unreal started OK, it's time to install the services.


Installing and Configuring Anope IRC Services

- Change to anope directory and start the installation:
CODE
cd ../anope-x.x.x
./Config

- Configuration answers:
CODE
install binaries to? I suggest /path/to/Unrealx.x/services
create dir? yes
install data files to? hit enter
group? hit enter
default umask? hit emter
MD5 passwd encryption? no (unless you really want it)
auto-check for mysql libs? hit enter

- Type make and make install to complete the compilation process
- When everything is done, cd to the services directory and copy the example conf:
CODE
cd /path/to/Unrealx.x/services
cp example.conf services.conf

- Open services.conf in your favorite editor and modify/add these values:
NOTE:
■ These are the values you've chosen in unrealircd.conf, in the link, u:line and network configuration blocks.
■ These are the values you have to edit in order to get the services quickly up and running.
CODE
IRCDModule "unreal32"
RemoteServer 127.0.0.1 6667 "services"
ServerName "services.yourdomain.com"
ServicesRoot "YourNicknameHere"

- Save and close the config file
- Start Anope IRC Services with debug mode enabled in order to spot:
CODE
./services -debug -nofork

- If the services didn't show any errors in the console and connected (and stayed connected) to the IRC server, it's safe to run them normally:
CODE
./services

- You can find the services commands (nickserv register etc) and general help either on the anope website, or by typing /msg nickserv help and /msg nickserv help AcommandHERE. This applies for other services as well, like ChanServ, MemoServ and so on.
- UnrealIRCD help cand also be found on it's official website.

That's all to it. Remember to allow incoming connections on ports 6667, 6697 and 8067 using iptables.

Enjoy your IRC server.