Штатный timezones.conf.xml весьма стар.
Хорошая новость: есть скрипт scripts/perl/timezone-gen.pl
Плохая новость: он лежит в сорцах и в штатных пакетах его нет, надо качать сорцы и забирать оттуда.
Для запуска требуется наличие актуального /usr/share/zoneinfo
понедельник, 5 сентября 2016 г.
вторник, 19 апреля 2016 г.
Dodging Sipvicious Script Kiddies и не только
https://www.onsip.com/blog/dodging-sipvicious-script-kiddies
использовать svcrash.py, баг легко правится.
http://blog.kolmisoft.com/sip-attack-friendly-scanner/
Далее, есть фаерволы.
Защита от флуда:
iptables -A INPUT -p udp --dport 5060 -m recent --name sip --set
iptables -A INPUT -p udp --dport 5060 -m recent --name sip --rcheck --seconds 30 --hitcount 30 -j DROP
http://www.skypeclub.ru/viewtopic.php?p=30526
http://www.voip-info.org/wiki/view/Asterisk+security
http://www.kolmisoft.com/scripts/fail2ban-iptables-script
почта принимается левая, кода нет, лучше свою не светить.
использовать svcrash.py, баг легко правится.
http://blog.kolmisoft.com/sip-attack-friendly-scanner/
Далее, есть фаерволы.
Защита от флуда:
iptables -A INPUT -p udp --dport 5060 -m recent --name sip --set
iptables -A INPUT -p udp --dport 5060 -m recent --name sip --rcheck --seconds 30 --hitcount 30 -j DROP
http://www.skypeclub.ru/viewtopic.php?p=30526
http://www.voip-info.org/wiki/view/Asterisk+security
http://www.kolmisoft.com/scripts/fail2ban-iptables-script
почта принимается левая, кода нет, лучше свою не светить.
вторник, 12 апреля 2016 г.
захват потоков voip
Самый простой вариант - через tcpdump
tcpdump -nq -s 0 -i eth0 -w /tmp/dump.pcap port 5060
но это будет только sip трафик, чего часто недостаточно. Зато теперь можно натравить wireshark и получить информацию по звонку и прочие flow
также неплохо подходит утилита ngrep
ngrep -d any port 5060 -W byline > outfile.txt
Есть sipgrep, первая версия похоже померла, есть такое
https://github.com/sipcapture/sipgrep
нужно собирать самим.
Отличается от ngrep более глубокой поддержкой сип протокола и его полей.
Самый простой пример запуска:
sipgrep -d any
sngrep
Также нет в репах, брать тут
https://github.com/irontec/sngrep
или тут
https://github.com/irontec/sngrep/wiki/Installing-Binaries
(для centos-like дистров не забываем заменить dist на centos|fedora|rhel)
Также есть софт с поддержкой захвата и RTP
pcapsipdump
формат как у tcpdump -w, умеет также захватывать rtp
tshark
Может идти отдельным пакетом или частью пакета wireshark (в центоси например).
Много опций, может сразу делать анализ. Умеет анализировать данные, в том числе jitter и искажения, пример:
tshark -i eth0 -o "rtp.heuristic_rtp: TRUE" -R 'rtcp.ssrc.fraction >= 1 or rtcp.ssrc.jitter >= 240' -V
Можно натравить вывод на pcapsipdump, разделяя сип-диалоги по разным файлам.
Можно анализировать качество RTP
tshark -q -f 'udp portrange 16384-32768' -o rtp.heuristic_rtp:TRUE -z rtp,streams
И особый комбайн
HOMER Sip Capture
SIP capturing server with HEP and IP-proto-4 (IPIP) & Monitoring Application with CallFlows, PCAP extraction, powerful search tools, statistics and API. Native HEP capture agent integrated in FreeSWITCH
Есть ещё более мощный, но уже платный продукт http://www.voipmonitor.org/
Линки
http://wiki.freeswitch.org/wiki/Packet_Capture
https://habrahabr.ru/post/274919/
tcpdump -nq -s 0 -i eth0 -w /tmp/dump.pcap port 5060
но это будет только sip трафик, чего часто недостаточно. Зато теперь можно натравить wireshark и получить информацию по звонку и прочие flow
также неплохо подходит утилита ngrep
ngrep -d any port 5060 -W byline > outfile.txt
Есть sipgrep, первая версия похоже померла, есть такое
https://github.com/sipcapture/sipgrep
нужно собирать самим.
Отличается от ngrep более глубокой поддержкой сип протокола и его полей.
Самый простой пример запуска:
sipgrep -d any
sngrep
Также нет в репах, брать тут
https://github.com/irontec/sngrep
или тут
https://github.com/irontec/sngrep/wiki/Installing-Binaries
(для centos-like дистров не забываем заменить dist на centos|fedora|rhel)
Также есть софт с поддержкой захвата и RTP
pcapsipdump
формат как у tcpdump -w, умеет также захватывать rtp
tshark
Может идти отдельным пакетом или частью пакета wireshark (в центоси например).
Много опций, может сразу делать анализ. Умеет анализировать данные, в том числе jitter и искажения, пример:
tshark -i eth0 -o "rtp.heuristic_rtp: TRUE" -R 'rtcp.ssrc.fraction >= 1 or rtcp.ssrc.jitter >= 240' -V
Можно натравить вывод на pcapsipdump, разделяя сип-диалоги по разным файлам.
Можно анализировать качество RTP
tshark -q -f 'udp portrange 16384-32768' -o rtp.heuristic_rtp:TRUE -z rtp,streams
И особый комбайн
HOMER Sip Capture
SIP capturing server with HEP and IP-proto-4 (IPIP) & Monitoring Application with CallFlows, PCAP extraction, powerful search tools, statistics and API. Native HEP capture agent integrated in FreeSWITCH
Есть ещё более мощный, но уже платный продукт http://www.voipmonitor.org/
Линки
http://wiki.freeswitch.org/wiki/Packet_Capture
https://habrahabr.ru/post/274919/
пятница, 5 февраля 2016 г.
среда, 3 февраля 2016 г.
чуть про bind_digit_action
<anthm> there are no variants only peer self and both
<anthm> and there can be no space after the , for exec:foo,bar
<anthm> and if you want instant execute you have to use exec[i]:foo,bar
<anthm> bind,#82,exec:digit_action_set_realm,none_b,self,peer
<anthm> self for where to listen to dtmf peer for where to send actions
<anthm> also could be self,both peer,self etc
и пример "пустого" бинда
action application=bind_digit_action, data=none_a,NONE,api:sleep,1
<anthm> and there can be no space after the , for exec:foo,bar
<anthm> and if you want instant execute you have to use exec[i]:foo,bar
<anthm> bind,#82,exec:digit_action_set_realm,none_b,self,peer
<anthm> self for where to listen to dtmf peer for where to send actions
<anthm> also could be self,both peer,self etc
и пример "пустого" бинда
action application=bind_digit_action, data=none_a,NONE,api:sleep,1
пятница, 22 января 2016 г.
про локальные бд для фс
из ирки, #freeswitch
<pankid> I am trying to setup freeswitch HA using thishttps://freeswitch.org/confluence/display/FREESWITCH/High+Availability . I configured freeswitch to store registrations on internal to a mysql database through odbc, but it doesnt seem to be writing anything to my database
<pankid> http://paste.debian.net/333170/
<eschmidbauer> pankid: take "<param name="core-recovery-db-dsn" value ..." out of sofia
<pankid> eschmidbauer: and only have it in switch.conf?
<eschmidbauer> you need this in switch.conf.xml --> <param name="core-db-dsn" value="..." />
<eschmidbauer> yes, you only need that and the above in switch.conf.xml
<eschmidbauer> then in sofia, you need
<eschmidbauer> <param name="odbc-dsn" value="...." />
<eschmidbauer> so yur sofia profiles share a single db
<eschmidbauer> and the core shares a single db
<pankid> do they need to be different databases?
<eschmidbauer> doesn't matter, they can be same
<eschmidbauer> or different, as long as the values are same on each box
<pankid> will freeswitch populate the database I created in mysql?
<pankid> according to this old documentation it will, https://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core#CentOS_5.2 but I am not seeing any indication freeswitch is trying to use this database.
<pankid> I am trying to setup freeswitch HA using thishttps://freeswitch.org/confluence/display/FREESWITCH/High+Availability . I configured freeswitch to store registrations on internal to a mysql database through odbc, but it doesnt seem to be writing anything to my database
<pankid> http://paste.debian.net/333170/
<eschmidbauer> pankid: take "<param name="core-recovery-db-dsn" value ..." out of sofia
<pankid> eschmidbauer: and only have it in switch.conf?
<eschmidbauer> you need this in switch.conf.xml --> <param name="core-db-dsn" value="..." />
<eschmidbauer> yes, you only need that and the above in switch.conf.xml
<eschmidbauer> then in sofia, you need
<eschmidbauer> <param name="odbc-dsn" value="...." />
<eschmidbauer> so yur sofia profiles share a single db
<eschmidbauer> and the core shares a single db
<pankid> do they need to be different databases?
<eschmidbauer> doesn't matter, they can be same
<eschmidbauer> or different, as long as the values are same on each box
<pankid> will freeswitch populate the database I created in mysql?
<pankid> according to this old documentation it will, https://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core#CentOS_5.2 but I am not seeing any indication freeswitch is trying to use this database.
Подписаться на:
Сообщения (Atom)