<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux and Unix technical recipes &#187; Yate</title>
	<atom:link href="http://www.howtonix.com/category/yate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtonix.com</link>
	<description>Linux Tutorial and Guide</description>
	<lastBuildDate>Thu, 30 Sep 2010 23:41:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Block DDoS attack on SIP Server</title>
		<link>http://www.howtonix.com/block-ddos-attack-sip-server/</link>
		<comments>http://www.howtonix.com/block-ddos-attack-sip-server/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:29:45 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[FreeSWITCH]]></category>
		<category><![CDATA[Kamailio]]></category>
		<category><![CDATA[OpenSIPS]]></category>
		<category><![CDATA[PJSIP]]></category>
		<category><![CDATA[Yate]]></category>
		<category><![CDATA[DDoS Attach on SIP Server]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=150</guid>
		<description><![CDATA[google_ad_client = "pub-4492234592142803"; /* 468x60, created 9/1/10 howtonix */ google_ad_slot = "5691725759"; google_ad_width = 468; google_ad_height = 60; Sometimes SIP Server attacked by hacker with huge number of SIP Registration.Which make mad the SIP Server.Full service can be get down. It can be blocked easily by IPTables. IPTables will work as Session Border Controller(SBC) for [...]]]></description>
			<content:encoded><![CDATA[
<!-- Quick Adsense WordPress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<script type="text/javascript">

google_ad_client = "pub-4492234592142803";
/* 468x60, created 9/1/10 howtonix */
google_ad_slot = "5691725759";
google_ad_width = 468;
google_ad_height = 60;


</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>Sometimes SIP Server attacked by hacker with huge number of  SIP Registration.Which make mad the SIP Server.Full service can be get down. It can be blocked easily by IPTables. IPTables will work as Session Border Controller(SBC) for SIP Server. This script will work only with SIP.it will not work for TLS or SIPS.</p>
<blockquote><p>
#!/bin/sh<br />
#<br />
# INVITE rate, per host.  Remember a successful (authenticated) call requires 2 INVITEs-<br />
# Initial INVITE, 407 auth required (w/ nonce), INVITE with nonce and authentication.<br />
IRATE=4/minute</p>
<p># REGISTER rate, per host.<br />
RRATE=2/minute</p>
<p># All other SIP methods rate, per host.  Be careful with SUBSCRIBEs, OPTIONS, CANCELs, etc.<br />
ORATE=10/minute</p>
<p># Methods for this script to ignore.  These SIP methods are always allowed.<br />
IGMETH=&#8221;OPTIONS&#8221;</p>
<p># Burst<br />
BURST=1</p>
<p># Interface(s) to protect on INPUT. Seperate multiple interfaces with spaces.<br />
# This will protect SIP services on THIS HOST.<br />
IFACE=&#8221;eth0&#8243;</p>
<p># Reject/drop action &#8211; usually something like DROP or REJECT.<br />
# Use ACCEPT to use this script to not filter traffic but still collect statistics.<br />
DACTION=DROP</p>
<p># Protocol(s) to filter &#8211; can be either tcp or udp or both. Seperate multiples with spaces.<br />
PROTOCOLS=&#8221;udp tcp&#8221;</p>
<p># Enable logging.<br />
#LOG=YES</p>
<p># Block tel: URIs completely?<br />
# P.S. &#8211; tel: sucks!<br />
BLOCKTEL=yes</p>
<p># Interface(s) to protect on FORWARD. Seperate multiple interfaces with spaces.<br />
# The same hashtable will protect the entire network from the same host(s).<br />
# Destination IP is NOT taken into consideration.<br />
# This will protect any SIP services running on the network that uses this machine<br />
# as a router (as long as you get the interfaces right).<br />
#FIFACE=&#8221;eth0&#8243;</p>
<p># Location of iptables binary.<br />
IPTABLES=`which iptables`</p>
<p># Search packet to this location. A larger offset looks further into the packet<br />
# and takes more time but could catch more attacks (and false alarms).<br />
# Remember, the method to match on is always in the beginning of the packet.<br />
OFFSET=65</p>
<p># SIP port<br />
SPORT=5060</p>
<p>if [ ! "$1" ]<br />
then<br />
echo &#8220;SIP DoS/DDoS mitigation script for iptables<br />
See top of script for configuration</p>
<p>Usage:<br />
$0 [start|stop|status]&#8221;<br />
exit 1<br />
fi</p>
<p>if [ "$1" = "status" ]<br />
then<br />
$IPTABLES -L -v -n<br />
exit<br />
fi</p>
<p># Setup iptables<br />
$IPTABLES -F sipdos 2&gt; /dev/null<br />
$IPTABLES -X sipdos 2&gt; /dev/null<br />
$IPTABLES -N sipdos 2&gt; /dev/null</p>
<p>if [ "$1" = "stop" ]<br />
then<br />
echo &#8220;Clearing iptables rules&#8230;&#8221;<br />
if [ "$FIFACE" ]<br />
then<br />
$IPTABLES -F FORWARD 2&gt; /dev/null<br />
fi<br />
$IPTABLES -F INPUT 2&gt; /dev/null<br />
exit<br />
fi</p>
<p># Send the right traffic through our chain<br />
for i in $IFACE<br />
do<br />
for l in $PROTOCOLS<br />
do<br />
$IPTABLES -A INPUT -i $i -m $l -p $l &#8211;dport $SPORT -j sipdos<br />
done<br />
done</p>
<p># Send the right forwarded traffic through our chain<br />
if [ "$FIFACE" ]<br />
then<br />
for j in $FIFACE<br />
do<br />
for l in $PROTOCOLS<br />
do<br />
$IPTABLES -A FORWARD -i $j -m $l -p $l &#8211;dport $SPORT -j sipdos<br />
done<br />
done<br />
fi</p>
<p># &#8220;Handle&#8221; tel: URIs<br />
if [ "$BLOCKTEL" ]<br />
then<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;tel:&#8221; &#8211;algo bm &#8211;to $OFFSET -j $DACTION<br />
fi</p>
<p># Ignore certain (configured) methods<br />
if [ "$IGMETH" ]<br />
then<br />
for k in $IGMETH<br />
do<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;$k sip:&#8221; &#8211;algo bm &#8211;to $OFFSET -j ACCEPT<br />
done<br />
fi</p>
<p># Finally set some limits&#8230;</p>
<p># INVITE limit<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;INVITE sip:&#8221; &#8211;algo bm &#8211;to $OFFSET \<br />
-m hashlimit &#8211;hashlimit $IRATE &#8211;hashlimit-burst $BURST \<br />
&#8211;hashlimit-mode srcip,dstport &#8211;hashlimit-name sip_i_limit -j ACCEPT</p>
<p># REGISTER limit<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;REGISTER sip:&#8221; &#8211;algo bm &#8211;to $OFFSET \<br />
-m hashlimit &#8211;hashlimit $RRATE &#8211;hashlimit-burst $BURST \<br />
&#8211;hashlimit-mode srcip,dstport &#8211;hashlimit-name sip_r_limit -j ACCEPT</p>
<p># All other SIP packets&#8230;<br />
$IPTABLES -A sipdos -m hashlimit &#8211;hashlimit $ORATE &#8211;hashlimit-burst $BURST \<br />
&#8211;hashlimit-mode srcip,dstport &#8211;hashlimit-name sip_o_limit -j ACCEPT</p>
<p># Take action on everything else<br />
if [ $LOG ]<br />
then<br />
$IPTABLES -A sipdos -j LOG<br />
fi</p>
<p>$IPTABLES -A sipdos -j $DACTION</p></blockquote>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/block-ddos-attack-sip-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>how to send SIP traffic Flood by sipsak?</title>
		<link>http://www.howtonix.com/how-to-send-sip-traffic-flood-by-sipsak/</link>
		<comments>http://www.howtonix.com/how-to-send-sip-traffic-flood-by-sipsak/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 04:50:12 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[FreeSWITCH]]></category>
		<category><![CDATA[OpenSIPS]]></category>
		<category><![CDATA[Yate]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=26</guid>
		<description><![CDATA[sipsak -F -vvv -u 500 -H 192.168.11.33 -l 5060 -s sip:192.168.11.52]]></description>
			<content:encoded><![CDATA[<p><strong>sipsak -F -vvv -u 500 -H 192.168.11.33 -l 5060 -s sip:192.168.11.52</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/how-to-send-sip-traffic-flood-by-sipsak/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to capture SIP Packet with Tcpdump ?</title>
		<link>http://www.howtonix.com/how-to-capture-sip-packet-with-tcpdump/</link>
		<comments>http://www.howtonix.com/how-to-capture-sip-packet-with-tcpdump/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 04:49:18 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[FreeSWITCH]]></category>
		<category><![CDATA[OpenSIPS]]></category>
		<category><![CDATA[Yate]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=24</guid>
		<description><![CDATA[tcpdump -i eth0 -n -s0 -v udp port 5060]]></description>
			<content:encoded><![CDATA[<p>tcpdump -i eth0 -n -s0 -v udp port 5060</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/how-to-capture-sip-packet-with-tcpdump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free SIP Out Bound Proxy Service</title>
		<link>http://www.howtonix.com/free-sip-out-bound-proxy-service/</link>
		<comments>http://www.howtonix.com/free-sip-out-bound-proxy-service/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 04:36:34 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[FreeSWITCH]]></category>
		<category><![CDATA[OpenSIPS]]></category>
		<category><![CDATA[Yate]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=14</guid>
		<description><![CDATA[Your free SIP Outbound Proxy Service, bypass local  ISPs&#8217; blocking, start using your broadband phone. http://freesps.googlepages.com/]]></description>
			<content:encoded><![CDATA[<p>Your free SIP Outbound Proxy Service, <strong><span style="color: #ff0000;">bypass local  ISPs&#8217; blocking</span></strong>, start using your broadband phone.</p>
<p><a href="http://freesps.googlepages.com/">http://freesps.googlepages.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/free-sip-out-bound-proxy-service/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

