Upgrade SER SIP Server

Posted by : hugo5688 at 16:05 in Linux | Total 1,174 Views

upgrade 0.8.12 to 0.9.6

Download:Here

OS:Linux RedHat 9

如有安裝舊版rpm檔,請先移除

needs to install

  1. gcc
  2. bison
  3. flex
  4. libxml2

$cd ser-0.9.6
$make && make modules
$make prefix=/usr/local install

安裝完成後,要刪除舊資料庫

否則啟動Service時會有問題

ser.cfg照原本的就可以了

$drop database ser;
$/usr/local/sbin/ser_mysql.sh create
$./ser

沒仔細去找升成新版後啟動時會出現SQL的錯誤

不過大概猜是table有變動,直接砍掉重建比較快 :P

NEWS:http://ftp.iptel.org/pub/ser/0.9.6/doc/NEWS

Apache防止DDoS攻擊模組 - mod_evasive

Posted by : hugo5688 at 12:28 in Linux | Total 1,357 Views

WHAT IS MOD_EVASIVE ?

mod_evasive is an evasive maneuvers module for Apache to provide evasive
action in the event of an HTTP DoS or DDoS attack or brute force attack. It
is also designed to be a detection tool, and can be easily configured to talk
to ipchains, firewalls, routers, and etcetera.

Download:http://www.zdziarski.com/projects/mod_evasive/

OS:RedHat 9

$tar zxvf mod_evasive_1.10.1.tar.gz
$cd mod_evasive
$/usr/sbin/apxs -i -a -c mod_evasive20.c

if can’t find apxs pls install httpd-devel-2.0.40-21.i386.rpm

$vi /etc/httpd/conf/httpd.conf

#add to the httpd.conf file

LoadModule evasive20_module /usr/lib/httpd/modules/mod_evasive20.so

<IfModule evasive20_module>
DOSHashTableSize 3097
DOSPageCount 3
DOSSiteCount 40
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 10
</IfModule>

$service httpd restart

how 2 test? Run test.pl, and view the response codes.

架設STUN Server

Posted by : hugo5688 at 12:05 in Linux | Total 1,186 Views

Download:http://sourceforge.net/project/showfiles.php?group_id=47735

$tar -xvf stund_0.96_Aug13
$cd stund
$make

bind another IP in ur eth0:0 or u have 2 eth card

start STUN service

$./server -v -h <IP_1> -a <IP_2>

“If the IP addresses of your NIC are 10.0.1.150 and 10.0.1.151, run this program with”
“./server -v -h 10.0.1.150 -a 10.0.1.151″
“STUN servers need two IP addresses and two ports, these can be specified with”
“-h sets the primary IP”
“-a sets the secondary IP”
“-p sets the primary port and defaults to 3478″
“-o sets the secondary port and defaults to 3479″
“-b makes the program run in the backgroud”
“-m sets up a STERN server starting at port m”
“-v runs in verbose mode”

add to ur bootload

$vi /etc/rc3.d/S99local

/<your patch>/server -b -h <IP_1> -a <IP_2>

———————————————————————————

目前STUN在穿越Symmetric NAT還是會有問題

在較新的技術ICE應該是可以做到

另外RTPProxy也行 ,不過聽說在語音的傳輸上並不是那麼的好