Asterisk 11 Centos 6.5 Установка

Образ используемый для установки
CentOS-6.5-x86_64-minimal.iso   md5 0d9dc37b5dd4befa1c440d2174e88a87

VM под астериск
Суффиксы DNS поиска

[root@ast-01 ~]# uname -r
[root@ast-01 ~]# yum update –y
[root@ast-01 ~]# sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
[root@ast-01 ~]# yum install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel libuuid-devel nano perl
[root@ast-01 jansson-2.5]# cd ../
[root@ast-01 src]# wget
[root@ast-01 src]# wget
[root@ast-01 src]# wget
[root@ast-01 src]# tar zxvf dahdi-linux-complete*
[root@ast-01 src]# tar zxvf libpri*
[root@ast-01 src]# tar zxvf asterisk*
[root@ast-01 src]# reboot
[root@ast-01 src]# cd /usr/src/dahdi-linux-complete* && make && make install && makeconfig
[root@ast-01 src]# chkconfig --add dahdi
[root@ast-01 src]# cd /usr/src/libpri* && make && make install
[root@ast-01 libpri-1.4.14]# cd /usr/src/asterisk*
[root@ast-01 asterisk-11.7.0]#./configure --libdir=/usr/lib64 && make menuselect && make && make install
[root@ast-01 asterisk-11.7.0]# make samples
[root@ast-01 asterisk-11.7.0]# yum install doxygen -y && make progdocs
[root@ast-01 asterisk-11.7.0]# make config
[root@ast-01 asterisk-11.7.0]# service dahdi start
[root@ast-01 asterisk-11.7.0]# service asterisk start
[root@ast-01 asterisk-11.7.0]# asterisk -r
Privilege escalation protection disabled!
See for more details.
Asterisk 11.7.0, Copyright (C) 1999 - 2013 Digium, Inc. and others.
Created by Mark Spencer <>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
Connected to Asterisk 11.7.0 currently running on ast-01 (pid = 29706)

[root@ast-01 src]# cd /usr/src/
[root@ast-01 src]# yum install -y python iptables
[root@ast-01 src]# wget
[root@ast-01 src]# tar jxf fail2ban-0.8.4.tar.bz2
[root@ast-01 src]# cd fail2ban-0.8.4
[root@ast-01 fail2ban-0.8.4]# python install
[root@ast-01 fail2ban-0.8.4]# cp /usr/src/fail2ban-0.8.4/files/redhat-initd /etc/init.d/fail2ban
[root@ast-01 fail2ban-0.8.4]# chmod 755 /etc/init.d/fail2ban
[root@ast-01 files]# touch /etc/fail2ban/filter.d/asterisk.conf
[root@ast-01 files]# cat /etc/fail2ban/filter.d/asterisk.conf
# Fail2Ban configuration file
# Read common prefixes. If any customizations available -- read them from
# common.local
#before = common.conf
#_daemon = asterisk
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P\S+)
# Values: TEXT
failregex = NOTICE.* .*: Registration from '.*' failed for '' - Wrong password
NOTICE.* .*: Registration from '.*' failed for '' - No matching peer found
NOTICE.* .*: Registration from '.*' failed for '' - Username/auth name mismatch
NOTICE.* .*: Registration from '.*' failed for '' - Device does not match ACL
NOTICE.* .*: Registration from '.*' failed for '' - Peer is not supposed to register
NOTICE.* .*: Registration from '.*' failed for '' - ACL error (permit/deny)
NOTICE.* .*: Registration from '.*' failed for '' - Device does not match ACL
NOTICE.* failed to authenticate as '.*'$
NOTICE.* .*: No registration for peer '.*' \(from \)
NOTICE.* .*: Host failed MD5 authentication for '.*' (.*)
NOTICE.* .*: Failed to authenticate user .*@.*
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
ignoreregex = #указываем наш IP с которого не будет проходить блок
[root@ast-01 files]#cat /etc/fail2ban/jail.conf

enabled = true
filter = asterisk
action = iptables-allports[name=ASTERISK, protocol=all]
sendmail-whois[name=ASTERISK, dest=root, sender=fail2ban@localhost]
logpath = /var/log/messages
maxretry = 5
bantime = 259200
[root@ast-01 files]# nano /etc/asterisk/logger.conf
dateformat=%F %T

syslog.local0 => notice
[root@ast-01 files]#service iptables start
[root@ast-01 files]#service fail2ban start

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Time limit is exhausted. Please reload the CAPTCHA.

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.