UnreaIRCd 4 Oto Kurulumu

Aytac

nicktag
Yönetici
Developer
Katılım
4 Şub 2020
Mesajlar
379
Tepkime puanı
50
Puanları
28
Konum
ircland
Web sitesi
www.ircalem.net
Bir çok kişi Unreal4 kurarken bazı sorunlar ile karşılaşmakta ve kuramamakta. Oturup tek tek kurulumu anlatmak yerine bir betik hazırladım. 4 adet soru sormakta. Bu sorular, sunucu adı, root nick ve şifresi ve sunucunun calisacagi ip adresi. Diğerlerini otomatik olarak ayarlamaktadır.

Unreal4 ile uyumlu nocaps, noamsg, hideserver, m_ircops, antirandom, nocodes, privdeaf, textban mödülleri de kurulum ile birlikte aktif olarak gelmektedir.

Unreal4'ü kurmak için yapmanız gereken tek şey aşşağıda vermiş oldugum kodu yazmak ve beklemek :) Kurulum bittikten sonra sunucu otomatik olarak başlatılacaktır.

Unreal sürümü unrealircd-4.2.0 olarak güncellenmiştir.
18 adet modül kurulmaktadır.(Detayı için conf dosyasını inceleyebilirsiniz.)

Gerekli testler OFSBILISIM makinalarında yapılmıştır.

Unrealircd4 oto kurulum kodu;

Kod:
#!/bin/bash
# Lethe v3 Unreal 4 (Tek) Kurulum 

baslangic=$(date +%s)
baslangic1=`date +%R`
DIZIN=`pwd`
KOMUT=`basename $0`

# Kurulum Ayarlari

rumuz="BehroozWolf" 			# Kurulumda ornek cikacak olan nick
rootsifre="123456" 				# Kurulumda ornek olarak cikacak sifre
mename="behroozwolf.net" 		# Kurulumda ornek olarak cikacak domain
ip="127.0.0.1" 					# Kurulumda ornek olarak cikacak ip


# Renk ayarlari (BUNLARA DOKUNMAYIN)

normal=$'\e[0m'                           
bold=$(tput bold)                         
kirmizi="$bold$(tput setaf 1)"                
yesil=$(tput setaf 2)                     
acikkahve=$(tput setaf 3); beige="$fawn"       
sari="$bold$acikkahve"                       
koyumavi=$(tput setaf 4)                  
mavi="$bold$koyumavi"                     
mor=$(tput setaf 5); magenta="$purple"                           
koyukahve=$(tput setaf 6)                  
kahve="$bold$koyukahve"                     
gri=$(tput setaf 7)                      
koyugri="$bold"$(tput setaf 0)           
beyaz="$bold$gri" 

# irc indirme linkleri

unreal4="http://arsiv.behroozwolf.net/servers/unrealircd/unrealircd-4.2.0.tar.gz"
unreal4m="http://arsiv.behroozwolf.net/servers/unrealircd/modules/u4modules.zip"

kontrol_et() {
printf "${yesil} Klasorler kontrol ediliyor...Lutfen bekleyin.${normal}\n"
sleep 1
if [ -d "${DIZIN}/unrealircd-4.2.0" ]; then
   printf "${sari} unrealircd-4.2.0 klasoru icerisinde dosyalar mevcut. Klasoru silip yeniden deneyiniz.${normal}\n"
   exit    
else
   printf "${yesil} Klasor kontrolu tamamlandi.${normal}\n"
fi  
bilgileri_sor	
}

bilgileri_sor () {
printf "${sari} Kurulum yapilacak olan sunucu ismini yaziniz ${normal}\n"
echo -e $n "${mavi} [$mename] -> $c ${normal}"
read cc
if [ ! -z $cc ]; then
	mename="$cc"
fi

printf "${sari} /admin komutunda, servislere ve botlara root olarak tanitilacak sunucu sahibinin nickini yaziniz${normal}\n"
echo -e $n "${mavi} [$rumuz] -> $c ${normal}"
read cc
if [ ! -z "$cc" ]; then
	rumuz="$cc"
fi

printf "${sari} Root admin nick sifresini yazin ${normal}\n"
echo -e $n "${mavi} [$rootsifre] -> $c ${normal}"
read cc
if [ ! -z $cc ]; then
        rootsifre="$cc"
fi

printf "${sari} Sunucunun calisacagi IP adresi ${normal}\n"
echo -e $n "${mavi} [$ip] -> $c ${normal}"
read cc
if [ ! -z $cc ]; then
	ip="$cc"
fi
unreal_kur
}

# Anope geoipupdate
indir() {
    local url=$1
    local desc=$2
    echo -ne "   $desc     "
    wget --progress=dot $url 2>&1 | grep --line-buffered "%" | sed -u -e "s,\.,,g" | awk '{printf("\b\b\b\b%4s", $2)}'
    echo -ne " [\e[31mTAMAMLANDI\e[0m]\n"
}

unreal_kur() {
cat > config.settings << EOF
#
BASEPATH="${DIZIN}/unrealircd"
BINDIR="${DIZIN}/unrealircd/bin"
DATADIR="${DIZIN}/unrealircd/data"
CONFDIR="${DIZIN}/unrealircd/conf"
MODULESDIR="${DIZIN}/unrealircd/modules"
LOGDIR="${DIZIN}/unrealircd/logs"
CACHEDIR="${DIZIN}/unrealircd/cache"
DOCDIR="${DIZIN}/unrealircd/doc"
TMPDIR="${DIZIN}/unrealircd/tmp"
LIBDIR="${DIZIN}/unrealircd/lib"
PREFIXAQ="1"
MAXSENDQLENGTH="3000000"
MAXCONNECTIONS="1024"
NICKNAMEHISTORYLENGTH="2000"
DEFPERM="0600"
SSLDIR=""
REMOTEINC=""
CURLDIR=""
SHOWLISTMODES="1"
TOPICNICKISNUH=""
SHUNNOTICES=""
NOOPEROVERRIDE=""
DISABLEUSERMOD=""
OPEROVERRIDEVERIFY=""
DISABLEEXTBANSTACKING=""
GENCERTIFICATE="0"
EXTRAPARA=""
ADVANCED=""
EOF

# Kurulum
echo -e "\e[32mIndiriliyor......\e[0m"
indir "$unreal4" "\e[31munrealircd-4.2.0:\e[0m"
tar -xf unrealircd-4.2.0.tar.gz
mv config.settings ${DIZIN}/unrealircd-4.2.0
cd ${DIZIN}/unrealircd-4.2.0
./Config -q
make
make install
cd ..
cd ${DIZIN}/unrealircd-4.2.0/src/modules/third
echo -e "\e[32mModuller indiriliyor...\e[0m"
indir "$unreal4m" "\e[31mUnreal4 Modules:\e[0m"
unzip u4modules.zip
rm -rf u4modules.zip
cd ..
cd ${DIZIN}/unrealircd-4.2.0/
make
make install
cd ..
unreal_conf
}

unreal_conf() {
cat > unrealircd.conf << EOF
#############################################################################################################################
#                                                                                                                           #
#     Bu konfigirasyon(ayarlar) dosyasi 'BehroozWolf' tarafindan OFSBILISIM icin yazilmistir.    						    #
#                                                                                                                           #
#     Bu surum www.behroozwolf.net icin ozel olarak hazirlanmistir.	       	      	                            		    #
#                                                                                                                           #
#############################################################################################################################
include "modules.default.conf";
include "help/help.conf";
include "badwords.conf";
include "spamfilter.conf";
include "operclass.default.conf";

me {
	name "irc.$mename";
	info "www.mename";
	sid "008";
};

admin {
	"$rumuz";
	"www.$mename";
};

class clients
{
	pingfreq 600;
	maxclients 1000;
	sendq 200k;
	recvq 8000;
};

class opers
{
	pingfreq 90;
	maxclients 50;
	sendq 1M;
	recvq 8000;
};

class servers
{
	pingfreq 60;
	connfreq 15; 
	maxclients 10; 
	sendq 5M;
};

allow {
	ip *@*;
	class clients;
	maxperip 5;
};

allow {
	ip *@192.0.2.1;
	class clients;
	password "somesecretpasswd";
	maxperip 20;
};

oper $rumuz {
	class opers;
	mask *@*;
	password "$rootsifre";
	operclass netadmin;
	snomask "cDFfkejvGnNqsSo";
	swhois "is a Root Administrator";
	vhost root.$mename;
};

listen {
	ip $ip;
	port 6660-6669;
};

listen {
	ip $ip;
	port 7003;
};

listen {
	ip $ip;
	port 7000;
	options { serversonly; };
};

ulines {
	services.$mename;
};

drpass {
	restart "restart";
	die "die";
};

log "ircd.log" {
	flags {
		oper;
		connects;
		server-connects;
		kills;
		errors;
		sadmin-commands;
		chg-commands;
		oper-override;
		tkl;
		spamfilter;
	};
};

include "aliases/anope.conf";

ban nick {
	mask "*C*h*a*n*S*e*r*v*";
	reason "Servisler için ayrılmış";
};

ban server {
	mask eris.berkeley.edu;
	reason "Defol git buradan.";
};

ban user {
	mask *[email protected]*.saturn.bbn.com;
	reason "Salak";
};

ban realname {
	mask "Swat Team";
	reason "mIRKFORCE";
};

ban realname {
	mask "sub7server";
	reason "sub7";
};

except ban {
	mask *@192.0.2.1;
};

except tkl {
	mask *@192.0.2.1;
	type all;
};

deny dcc {
	filename "*sub7*";
	reason "Olası Sub7 Virüsü";
};

deny channel {
	channel "*warez*";
	reason "Warez is illegal";
	class "clients";
};

vhost {
	vhost i.hate.microsefrs.com;
	mask *@unrealircd.com;
	login "test";
	password "test";
};

set {
	auto-join 		"#sohbet";
	network-name 		"$mename";
	default-server 		"irc.$mename";
	services-server 	"services.$mename";
	stats-server 		"stats.$mename";
	help-channel 		"#Help";
	hiddenhost-prefix	"Cloak";
	prefix-quit 		"Quit";
	cloak-keys {
		"O2A167ABGPy3bXP1mSLA2aPDeaBwtj1CP5vJNs331ib7LCM5BXWJRQJYRE";
		"N0V12k3Cqynab1Hly4o61mP01ku5NIA524O22LJE2t4QoEb5f2pn";
		"w5ppCTcus3Uxchwsr0yTGJhPpto52YUm115w62hy1c8MX4q5VE0tV81";
	};
};

set {
	kline-address "[email protected]$mename"; 
	modes-on-connect "+ixw"; 
	modes-on-oper	 "+xlwpWgs"; 
	oper-auto-join "#opers"; 
	options {
		hide-ulines; 
		show-connect-info; 
	};
	maxchannelsperuser 10; 
	anti-spam-quit-message-time 10s;
	static-quit "Client quit";	
	static-part yes; 
	oper-only-stats "*";
	anti-flood {
		nick-flood 3:60;	
		connect-flood 3:60;    
		away-flood 4:120;
	};
	spamfilter {
		ban-time 1d; 
		ban-reason "Spam/Advertising"; 
		virus-help-channel "#spam"; 
		except "#help";
	};
};

webirc {
	mask $ip;
	password "ofsbilisim";
};

except throttle {
        mask $ip;
};


link services.$mename {
	incoming {
		mask $ip;
	};
	outgoing {
		bind-ip *;
		hostname $ip;
		port 7000;
		options { };
	};
	password "services";
	class servers;
};

loadmodule "antirandom";
loadmodule "third/m_anti_amsg";
loadmodule "third/m_anticaps";
loadmodule "third/m_chansno";
loadmodule "third/m_clones";
loadmodule "third/m_commandsno";
loadmodule "third/m_denyban";
loadmodule "third/m_fantasy";
loadmodule "third/m_joinmute";
loadmodule "third/m_kickjoindelay";
loadmodule "third/m_listrestrict";
loadmodule "third/m_message_commonchans";
loadmodule "third/m_netadmins";
loadmodule "third/m_operpasswd";
loadmodule "third/m_pmdelay";
loadmodule "third/m_pmlist";
loadmodule "third/m_rmtkl";
loadmodule "third/m_portsifresi";


pmlist {
    noticetarget 0; 
    noticedelay 60; 
};

set {
pmdelay 60;
commandsno "version,admin,module";
};

set {
	antirandom {
		threshold 5;
		ban-action kill;
		ban-time 4h;
		ban-reason "You look like a bot. Be sure to fill in your nick/ident/realname properly.";
		convert-to-lowercase yes;
		fullstatus-on-load yes;
		show-failedconnects yes;
		except-hosts {
			"irc-gateway.mynet.xx";
			"*.trusted.yy";
			"192.168.*";
		};
	};
};

denyban {
    allowopers 0;
    denynotice 1;
    reason "ayy ur faget lol (stripped $num masks)";
    mask BAN_ALL;
    mask *!*@*malvager.net;
};

chansno {
   msgtype privmsg;

   channel "#log" {
      server-connects; squits; oper-ups;
   };

   channel "#log" {
      mode-changes; topics; joins; parts; kicks;
   };
};

psifre {
   pass "6697:sifre";
};

anticaps {
   capslimit 10;
   minlength 10;
   lowercase_it 1;
};
	
fantasy {
    	// Change command prefix to \, so it becomes \dovoice etc
    	//cmdchar \;

    	// "!dovoice urmom" results in "/mode $chan +v urmom"
    	dovoice		"MODE $chan +v $1";
    	unvoice		"MODE $chan -v $1";

    	// "!fgt urmom" is turned into "/kick $chan urmom :ayyyyy ur faget"
    	fgt			"KICK $chan $1 :ayyyyy ur faget";

    	// "!bitchnigga urmom dickface" results in a separate "/kick $chan $nick :nigga b0iiii" for both urmom and dickface
    	bitchnigga	"KICK $chan $1- :nigga b0iiii";

    	// "!ayylmao urmom u goddam fuckstick" becomes "/kick urmom :u goddam fuckstick"
    	ayylmao		"KICK $chan $1 :$2-";

    	// "!invex urmom" is majikked into "/mode $chan +I *!*@urmom.tld"
    	invex		"MODE $chan +I *!*@$1h";
    	uninvex		"MODE $chan -I *!*@$1h";

    	// "!safe urmom" will become "/kick $chan urmom :$chan is a safe space lol m8 urmom"
    	safe		"KICK $chan $1 :$chan is a safe space lol m8 $1";

    	// It is also possible to have the same alias issue multiple commands ;]
    	safe		"MODE $chan +b *!*@$1h";

    	// You can also go through ChanServ, provided you have access with it
    	n			"PRIVMSG ChanServ :KICK $chan $1 change your nick and rejoin lol";
    };
	
operclass netadmin-operpasswd {
    parent netadmin;
    privileges {
        operpasswd;
    };
};

operpasswd {
    enable-global-notices 1;
    enable-logging 0;
    max-failed-operups 3;
    failop-kill-reason "Too many failed OPER attempts lol";
};

operclass netadmin-protected {
    parent netadmin;
    privileges {
        m_netadmins { partial; };
    };
};

EOF

mv unrealircd.conf ${DIZIN}/unrealircd/conf
cd ${DIZIN}/unrealircd
./unrealircd start
cd ..
rm -rf unrealircd-4.2.0.tar.gz
sleep 1
clear
printf "${kahve} ********************************************************************************************************************************************\n"
printf "${mavi} Kurulum yapilan ip:${yesil} $ip${normal} $kirmizi#${normal} ${mavi} domain: ${yesil} $mename${normal} $kirmizi#${normal} ${mavi} root: ${yesil} $rumuz ${normal}
${mavi} Modules: ${kirmizi}18 ${mavi}adet modul bulunmaktadir. Sunucu icerisinde ${kirmizi}/module ${mavi}yazarak gorebilirsiniz. ${normal}\n"
printf "${kahve} ********************************************************************************************************************************************\n"
bit=$(date +%s)
bit1=`date +%R`
fark=$(($bit - $baslangic))
dakika=`expr $fark / 60`
saniye=`expr $fark % 60`
printf "${sari} Baslangic            : ${kirmizi} $baslangic1
${sari} Bitis                : ${kirmizi} $bit1
${sari} Calisma Suresi       : ${kirmizi} $dakika dakika $saniye saniye\n"
printf "\n$kirmizi Written $yesil by ${mavi} BehroozWolf ${normal}<${yesil} www.behroozwolf.net${normal} >\n"
history -c && history -w
}

case "${1}" in
	[u][4]) 
	kontrol_et
	;;
	*)
	printf "${kirmizi}Kurmak için ${mavi}sh unreal4.bash u4 ${kirmizi}yazmalisiniz.${normal}\n"
	;;
esac
 
Üst