dot

packages and services management
Log | Files | Refs | README

commit 375c1faaf2db9de8d630255b6a91c5f29a52e36b
parent 383df00d217cd5b3e2b26311712be39710aa8adb
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri,  1 Dec 2017 02:22:35 +0100

ngircd running locally with tls script helper

Diffstat:
Mbin/tls | 10+++++-----
Mpackage/ngircd/build | 2+-
Mskel/ngircd/conf | 63+++++++++++++++++++++++++++++++++------------------------------
3 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/bin/tls b/bin/tls @@ -3,14 +3,14 @@ case $1 in (update) [ $# -eq 2 ] || exec "$0" - set -e + set -ex mkdir -p "$(dirname "$2")" - openssl genpkey -algorithm RSA -out "$2.key" \ - -pkeyopt rsa_keygen_bits:2048 + openssl req -x509 -newkey rsa:4096 -days 365 \ + -keyout "$2.key" -out "$2.pem" chmod 400 "$2.key" - openssl openssl rsa -pubout -in "$2.key" -out "$2.pem" chmod 444 "$2.pem" - openssl rsa -text -in "$2.key" + openssl dhparam -out "$2.dhp" 4096 + chmod 444 "$2.dhparams.pem" ;; (*) printf 'usage: tls [update path]\n' diff --git a/package/ngircd/build b/package/ngircd/build @@ -1,4 +1,4 @@ ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --with-openssl \ - --prefix="$OPT" --sbindir="$OPT/bin" --sysconfdir="$HOME/etc/ngircd" + --prefix="$OPT" --sbindir="$OPT/bin" --sysconfdir="/etc/ngircd" make install diff --git a/skel/ngircd/conf b/skel/ngircd/conf @@ -1,42 +1,45 @@ [Global] - Name = XXX - AdminInfo1 = josuah - AdminInfo2 = XXX - AdminEMail = mail@josuah.net - Info = XXX - MotdFile = /etc/ngircd/motd - Network = XXX - Ports = 6667 + Name = XXX + AdminInfo1 = josuah + AdminInfo2 = XXX + AdminEMail = mail@josuah.net + Info = XXX + MotdFile = /etc/ngircd/motd + Network = XXX + Ports = 6667 [Limits] - MaxConnections = 128 - MaxConnectionsIP = 20 - MaxJoins = 50 - MaxNickLength = 10 - PingTimeout = 120 - PongTimeout = 120 + MaxConnections = 128 + MaxConnectionsIP = 20 + MaxJoins = 50 + MaxNickLength = 10 + PingTimeout = 120 + PongTimeout = 120 [Options] - AllowedChannelTypes = #&+ - AllowRemoteOper = yes - CloakHost = %x%x - CloakHostSalt = XXX - DefaultUserModes = iC - DNS = no - Ident = no - MorePrivacy = yes - OperCanUseMode = yes - OperChanPAutoOp = yes + AllowedChannelTypes = #&+ + AllowRemoteOper = yes + CloakHost = %x%x + CloakHostSalt = XXX + DefaultUserModes = iC + DNS = no + Ident = no + MorePrivacy = yes + OperCanUseMode = yes + OperChanPAutoOp = yes [SSL] - CertFile = /var/ngircd/ssl/XXX.pem - CipherList = XXX - DHFile = /var/ngircd/ssl/dhparams.pem - KeyFile = /var/ngircd/ssl/XXX.key - Ports = 6697 + Ports = 6697 + CertFile = /var/ngircd/tls/XXX.pem + DHFile = /var/ngircd/tls/XXX.dhp + KeyFile = /var/ngircd/tls/XXX.key + KeyFilePassword = XXX + CipherList = XXX [Operator] - XXX + Name = josuah + Password = XXX + Mask = josuah!XXX [Server] XXX