-
Notifications
You must be signed in to change notification settings - Fork 4
Amazon LinuxにIRCサーバーを立ててみる
mechamogera edited this page Sep 24, 2012
·
4 revisions
- ec2インスタンス起動
- Security Groupで6667番をあけておく
- ircdサーバーインストール
$ sudo yum -y update
$ sudo yum install -y --enablerepo=epel ircd-hybrid
$ sudo chkconfig ircd on
$ sudo cp /etc/ircd/ircd.conf{,.org}
$ sudo vi /etc/ircd/ircd.conf
$ sudo diff -U 0 /etc/ircd/ircd.conf{.org,}
--- /etc/ircd/ircd.conf.org 2012-09-24 11:04:07.706223456 +0000
+++ /etc/ircd/ircd.conf 2012-09-24 12:13:52.996503008 +0000
@@ -56 +56 @@
- sid = "_CHANGE_ME_";
+ sid = "1AB";
@@ -264 +264 @@
- port = 6665 .. 6669;
+ port = 6667;
@@ -278,3 +277,0 @@
- flags = hidden, ssl;
- host = "192.168.0.1";
- port = 6697;
@@ -286,5 +282,0 @@
- host = "1.2.3.4";
- port = 7000, 7001;
-
- host = "3ffe:1234:a:b:c::d";
- port = 7002;
@@ -302,0 +295 @@
+ user = "*@*";
@@ -305 +298 @@
- password = "letmein";
+ password = "$1$cAGUeLf1$rflqkqQWtsXpAzQN4uNFm1";
@@ -1147 +1139,0 @@
- havent_read_conf = 1;
$ sudo /etc/init.d/ircd start
- sidは[0-9][A-Z0-9][A-Z0-9]のフォーマットで適当に生成
- passwordの値は以下のコマンドで取得
- user、passwordはauth {}中に設定
$ /usr/libexec/ircd/mkpasswd -m
# => パスワードにしたい文字列を入力後リターン
- LimeChatで接続 => OK
- Server: [ec2のDNS名]
- Port: 6667
- Server Password: [mkpasswdコマンドで入力した値]
- ssl接続設定
- 上記のIRCサーバーインストール済とする
$ sudo mkdir -p /etc/secure/ircd
$ cd /etc/secure/ircd
$ sudo openssl genrsa -out rsa.key 2048
$ sudo openssl rsa -in rsa.key -pubout -out rsa.pub
$ sudo chown ircd:ircd *
$ sudo chmod 600 *
$ sudo openssl req -new -days 365 -x509 -key rsa.key -out cert.pem
$ sudo cp /etc/ircd/ircd.conf{,.bak}
$ sudo vi /etc/ircd/ircd.conf
$ sudo diff -U 0 /etc/ircd/ircd.conf{.bak,}
--- /etc/ircd/ircd.conf.bak 2012-09-24 12:13:52.996503008 +0000
+++ /etc/ircd/ircd.conf 2012-09-24 12:13:38.023491565 +0000
@@ -56,0 +57,2 @@
+ rsa_private_key_file = "/etc/secure/ircd/rsa.key";
+ ssl_certificate_file = "/etc/secure/ircd/cert.pem";
@@ -263,0 +266 @@
+ flags = ssl;
$ sudo /etc/init.d/ircd restart
- flagsはlisten {}中に設定
- flagsはport 6667の上に記述する(下だと効かなくてはまった)
- LimeChatで接続 => OK
- Serverの設定でSSL connectionにチェックを入れる