<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="Tiki CMS/Groupware via FeedCreator 1.7.2" -->
<?xml-stylesheet href="http://www.pointyhair.com/lib/rss/rss-style.css" type="text/css"?>
<?xml-stylesheet href="http://www.pointyhair.com/lib/rss/rss20.xsl" type="text/xsl"?>
<rss version="2.0">
    <channel>
        <title>Tiki RSS feed for weblogs</title>
        <description></description>
        <link>http://www.pointyhair.com/tiki-blogs_rss.php?ver=2</link>
        <lastBuildDate>Thu, 09 Sep 2010 06:47:27 +0100</lastBuildDate>
        <generator>Tiki CMS/Groupware via FeedCreator 1.7.2</generator>
        <image>
            <url>http://www.pointyhair.com/img/tiki.jpg</url>
            <title>tikiwiki logo</title>
            <link>http://www.pointyhair.com/tiki-index.php</link>
            <description><![CDATA[Feed provided by http://www.pointyhair.com/tiki-index.php. Click to visit.]]></description>
        </image>
        <language>en-us</language>
        <item>
            <title>Doorbell 2.0</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=7&amp;postId=28</link>
            <description><![CDATA[Having a large house (well, not by square foot, but by distance of my home office from the front door...) poses a problem with how to make a doorbell work.<br />
<br />
So, I looked at various sellers of doorbells &mdash; any doorbell that works across 300 yards, will cost some money.<br />
Then, I have two doors that I'd like to have the doorbells at.<br />
<br />
Isn't this just begging a geeky solution?<br />
<br />
Since I already have the whole house wired with multiple gigabit backbone (bragging here) and an Asterisk/FreePBX phone system... isn't there a better solution?<br />
<br />
And, since I can find Sipura SPA-841 phones on eBay for $10 a piece... (I bought a dozen)<br />
<br />
So, all that was needed, was just to build some weather resistant enclosures for the phones, and program them so they only work in intercom mode.<br />
<br />
The magical ingredient, was to put in the EXT1/EXT2 dialplan of the phones:<br />
<div class="simplebox"><pre>(S0:501@192.168.254.1:5060)</pre></div>(Sorry; add a less-than before the first colon, and a greater than before the closing parenthesis)<br />
<br />
Where 501 is the extension for whole-house bidirectional intercom, and 192.168.254.1 is the IP address (inside my network) for the asterisk. The rest is normal.<br />
<br />
Of course, the whole-house intercom on the asterisk, is just a simple "Paging and Intercom" configuration on FreePBX. It works beautifully with the Polycom and Sipura phones I have amassed from eBay.<br />
<br />
If a long-distance doorbell costs $90 (times two doors, and four ringers), and two measly SPA-841 phones cost just $10 a piece... what was the question?<br />
And now, if someone "rings the doorbell" I can get it to my cell phone... and I can press "1" to open the door lock... (see more on the home automation side)<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Fri, 11 Dec 2009 04:11:51 +0100</pubDate>
        </item>
        <item>
            <title>Unlimited incoming trunks...</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=7&amp;postId=27</link>
            <description><![CDATA[Incoming trunks, how many calls can you have?<br />
(and, on a side-note, do you have teenage daughters?)<br />
<br />
Taking a basic Broadvoice trunk line, it allows two simultaneous calls, inbound, outbound or mix.<br />
<br />
I obviously need much more <img alt="wink" src="img/smiles/icon_wink.gif" /><br />
<br />
Enter <a class="wiki" target="_blank" href="http://ipkall.com">ipkall</a> and unlimited incoming calls...<br />
You get free numbers in Seattle, and you route them to your Asterisk via IAX2 (they used to only support SIP, but IAX2 is more compressed, less traffic, better security, etc).<br />
<br />
Throughout this example, I'm using 3601111111 as the number that you get assigned by IPKall, obviously you'll want to use the real number.<br />
As the password, I'm using "mypasswd" &mdash; again, please use your imagination.<br />
<br />
Go to the site, register a number.<br />
<ul><li> Account type: IAX
</li><li> IAX User Name (after registration, change to the number you got): 3601111111
</li><li> IAX Proxy: your asterisk DNS name and /3601111111
</li><li> Password: mypasswd
</li></ul>
<br />
Now, on your asterisk, create a Trunk:<br />
<ul><li> Trunk name: ipkall
</li><li> User context: 3601111111
</li><li> User Details:<div class="simplebox"><pre>type=user
context=from-trunk
host=voiper.ipkall.com
auth=plaintext
secret=mypasswd</pre></div>
</li><li> The rest of the fields should be left blank
</li></ul>
<br />
Finally, in Inbound Routes, create a new one:<br />
<ul><li> DID Number: 3601111111
</li><li> CID Name prefix: IPKall:
<ul><li> This is not necessary, but since they don't pass the caller-id, you might as well make it easier to know what the call is about.
</li></ul></li><li> The rest of it... route as you choose
</li></ul>
<br />
So there... You might want to punch up "asterisk -r" to verify the routing of the incoming call.<br />
If everything goes right, you should be receiving incoming calls as authenticated IAX2 calls, and you can route them as you choose.<br />
<br />
Final bits:<br />
<ul><li> Go to your VoIP provider, and have them route all calls "when busy" (i.e. all your incoming connections are used) to the IPKall number
</li><li> Make sure you dial the IPKall number at least once a month, so they don't release it as "unused"
<ul><li> Or, better yet, make an automated script that calls (and tests) your new number once a week...
</li></ul></li><li> Create a conference call room on your Asterisk/FreePBX
</li><li> Remind everyone, that "mute is golden" while not speaking &mdash; if enough callers, things can get noisy
</li></ul>
<br />
I have had conference calls of 12 callers successfully with this setup.<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Fri, 11 Dec 2009 03:50:08 +0100</pubDate>
        </item>
        <item>
            <title>Howto: recognizing one of many phone numbers and routing</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=7&amp;postId=26</link>
            <description><![CDATA[Broadvoice (and other VoIP) providers allow you to register multiple phone numbers...<br />
All the phone numbers come through the same VoIP (SIP) registration.<br />
<br />
All you get is a "call indicator" or "distinctive ring pattern" or "short-short-long" to identify which number (DID) was actually called.<br />
<br />
How do you tell the incoming numbers apart in an Asterisk/FreePBX scenario?<br />
<br />
If you are using a plain asterisk, this is fairly easy to just build into the dialplan... but if you are using FreePBX (as I have switched to use, so I can spread some of the maintenance to other people), you have to actually know where to put it...<br />
<br />
My main phone number is 4087739689, that is the registered Broadvoice number.<br />
I have another number, 4089921711 which is for my consulting business.<br />
I also have another number, 5307250195, for use when family is vacationing at Lake Tahoe.<br />
<br />
Find in your asterisk/freepbx setup, the file <b>/etc/asterisk/extensions_custom.conf</b><br />
<br />
Add the following:<br />
<div class="simplebox">[from-pstn-custom]<br />
exten => 4087739689,n,GotoIf($["${SIP_HEADER(Alert-Info)}" = "http://127.0.0.1/Bellcore-dr3"]?from-pstn,4089921711,1)<br />
exten => 4087739689,n,GotoIf($["${SIP_HEADER(Alert-Info)}" = "http://127.0.0.1/Bellcore-dr4"]?from-pstn,5307250195,1)</div><br />
NOTE: the "http:...drX" needs to be inside less-than and greater-than brackets... it seems I can't get TikiWiki<a href="tiki-editpage.php?page=TikiWiki" title="Create page: TikiWiki" class="wiki wikinew">?</a> to agree to that...<br />
<br />
<br />
Note, the "from-pstn-custom" is a pre-determined context, read in by <b>/etc/asterisk/extensions.conf</b><br />
<br />
Note also, that I don't define the 4087739689 at all &mdash; I let  it "fall through" without any handling.<br />
<br />
All I'm doing here, is picking the "Alert-Info" of "Bellcore-dr3" and "Bellcore-dr4" which are the distinctive ring patterns for the 2nd and 3rd number I have... putting the proper DID in place by means of "Goto" back (recursively) to "from-pstn" context... and letting asterisk/freepbx do the rest of the work.<br />
<br />
One thing needed... now you need to add a few inbound routes.<br />
You probably already had the inbound route for "4087739689" &mdash; but now you also need inbound routes for "4089921711" and "5307250195" to route them as you please.<br />
<br />
In my scenario, I just route those pseudo-DIDs now to different IVRs and/or direct extensions.<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Fri, 11 Dec 2009 01:40:42 +0100</pubDate>
        </item>
        <item>
            <title>denyhosts -- almost best thing since sliced bread</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=3&amp;postId=25</link>
            <description><![CDATA[<a class="wiki" target="_blank" href="http://denyhosts.sourceforge.net/index.html">Denyhosts</a><br />
<br />
Almost too good to be true...<br />
<br />
What's good, is that it allows you to get almost rid of dictionary attacks on your SSH port...<br />
<br />
What's not so good, is that as of recent, the dictionary attacks on POP3, IMAP4, TELNET, FTP are significantly on the rise... and Denyhosts does not make it particularly easy to block the other protocols...<br />
<br />
If I manage to get the other protocols blocked, I'll publish the regex'es for those.<br />
<br />
Meanwhile, if you notice it in your log files, rememember that:<br />
<br />
iptables -A INPUT -s x.x.x.x -j DROP<br />
<br />
always works....<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Thu, 19 Nov 2009 08:25:44 +0100</pubDate>
        </item>
        <item>
            <title>Networking Asterisk with multiple uplinks</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=6&amp;postId=24</link>
            <description><![CDATA[Asterisk (VoIP) has an interesting bug...<br />
You can't really network Asterisk to use two uplink network connections, since Asterisk grabs the default interface and "rides with it"<br />
<br />
If you have a bastion host, that is routing all traffic from your SOHO (small office/home office), and you're trying to get the traffic separated, you will run into the problem of separating the traffic (traffic shaping), since you have to give asterisk the "default route"<br />
<br />
Here is what you do...<br />
<br />
Give Asterisk, the default route, i.e. define "ip route add default via 1.1.1.1 ethX"<br />
That should be the gateway and ethX interface that will be carrying your VoIP traffix.<br />
<br />
(remember to make asterisk listen to all interfaces, bind 0.0.0.0)<br />
<br />
Prepare the tables with:<br />
echo 100 att >> /etc/ip_route2/rt_tables<br />
echo 101 speakeasy >> /etc/ip_route2/rt_tables<br />
<br />
Then, assuming two interfaces (eth1 on at&amp;t at 1.1.1.2, and eth2 on speakeasy (good only for bulk traffic) at 2.1.1.2), make source routing tables:<br />
<br />
ip rule add from 1.1.1.2 table att<br />
ip route add default via 1.1.1.1 dev eth1 src 1.1.1.2 table att<br />
ip rule add from 2.1.1.2 table speakeasy<br />
ip route add default via 2.1.1.1 dev eth2 src 2.1.1.2 table speakeasy<br />
<br />
You're halfway there... now let's get source routing in place... this is what makes the server respond back on the same IP that it receives requestss...<br />
<br />
ip rule add from 1.1.1.2 table att<br />
ip rule add from 2.1.1.2 table speakeasy<br />
<br />
Now, if a packet comes from 1.1.1.2 it will take the att route, if it's from 2.1.1.2 it will take the speakeasy route.<br />
<br />
Finally, let's add the special incantation to get your local traffic (on eth0, with 10.0.0.0/24 to go through speakeasy, since it's only good for bulk traffic)<br />
<br />
We need to mark the packets before "routing decision"<br />
<br />
iptables -t mangle -A PREROUTING -i eth0+ -s 10.0.0.0/24 ! -d 10.0.0.0/24  -j MARK &mdash; set-mark 1<br />
<br />
Now we route the packets the right way; i.e. all local outbound SNATted traffic takes the bulk speakeasy route<br />
<br />
ip rule add fwmark 1 table speakeasy<br />
<br />
And finally, we make the SNAT rule for speakeasy, for all fwmark 1 packets<br />
<br />
iptables -t nat -A POSTROUTING -m mark --mark 1 -j SNAT --to 2.1.1.2<br />
<br />
Now, please... the fictitious IP numbers:<br />
<ul><li> 1.1.1.1 is the gateway for 1st DSL
</li><li> 1.1.1.2 is your IP for the 1st DSL
</li><li> 2.1.1.1 is the gateway for 2nd DSL
</li><li> 2.1.1.2 is your IP for the 2nd DSL
</li><li> 10.0.0.0/24 is your local network
</li></ul>
<br />
Change all, as appropriate... don't ever assume that these are valid IP numbers.<br />
(Only networks like 10.x.x.x or 192.168.x.x are private, if you pick anything else for your internal network, you will be blocking out parts of the internet for yourself)<br />
<br />
<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Thu, 19 Nov 2009 08:19:41 +0100</pubDate>
        </item>
        <item>
            <title>Oracle 10g Express Edition vs. 64 bit client drivers</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=5&amp;postId=23</link>
            <description><![CDATA[If you have the Oracle 10g (10.2.0.1.0) Express Edition, you'll notice that everything is 32 bit...<br />
<br />
But, what if you have a 64 bit client, such as RHEL 5/64 (or CentOS 5/64)?<br />
<br />
What you'd do... is to download the normal 10g client, for 64 bits...<br />
<br />
And then configure the client to use a connection string like: host.domain.com:1521/XEXDB<br />
<br />
The XEXDB (service name) is something you'll find on the server from the init.ora with the dispatchers parameter...<br />
<br />
The Express Edition is pretty cool for casual testing, building a test framework, etc.<br />
Remember that it has the 2GB data and memory size limitation.<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Thu, 19 Nov 2009 07:45:25 +0100</pubDate>
        </item>
        <item>
            <title>C++ programming with Ubuntu 9.10 and Boost 1.40</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=5&amp;postId=22</link>
            <description><![CDATA[I'm starting this blog backwards...<br />
<br />
But, I want to help others who have run into an issue, developing with Boost 1.40 on Kubuntu/Ubuntu 9.10<br />
<br />
Basically, if you run into a number of problems, once you've upgraded to Ubuntu 9.10, the issue might be that you have an ealier version of Boost, such as 1.37 installed...<br />
<br />
Earlier version of Boost would install in /usr/local/include &mdash; and your build system might end up with a hybrid of header files from 1.40 in /usr and 1.37 from /usr/local, resulting in mysterious non-compiles...<br />
<br />
What you need to do, is to remove or rename (as sudo) the /usr/local/boost directory (which is a symlink to the 1.37) &mdash; only for development.<br />
<br />
Boost, changed their methodology for versioning in 1.40 &mdash; all for the better, finally to the LSB standard &mdash; but the transition is going to give us a bit of pain.<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Thu, 19 Nov 2009 07:35:04 +0100</pubDate>
        </item>
        <item>
            <title>Using Pion for network security</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=3&amp;postId=21</link>
            <description><![CDATA[Pion, by <a class="wiki" target="_blank" href="http://atomiclabs.com">Atomic Labs</a> can do some pretty incredible tricks on detecting anomalies, hacking attempts, etc. by passively looking at the network traffic.<br />
<br />
Imagine, being able to program (graphically, no program code) any kind of web/smtp/voip event, and being able to take action real-time.<br />
<br />
Check out <a target="_blank" class="wiki"  href="http://atomiclabs.com">http://atomiclabs.com</a> &mdash; I will write actual recipes soon.<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Mon, 20 Jul 2009 08:07:56 +0100</pubDate>
        </item>
        <item>
            <title>Russian (caravan.ru) link spammers</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=3&amp;postId=20</link>
            <description><![CDATA[<a name='Tiki_link_spammers'></a><h1>Tiki link spammers</h1>
<br />
So tired... seriously, first email spam (BTW, how about a presidential candidate that has capital punishment for spammers?) and now trackback link spammers.<br />
<br />
There is this russian network, caravan.ru, that is relentlessly pounding on my dozen or so tikiwiki sites, adding a trackback link spam every few second.<br />
<br />
Here is what it looks like in your logs:<br />
<div class="simplebox">217.23.147.210 - - <a class="wiki"  href="03/Sep/2007:08:53:10 -0700">03/Sep/2007:08:53:10 -0700</a> "POST /tiki-view_blog_post.php/1/1 HTTP/1.1" 200 - "-" "WordPress/1.9"<br />
212.24.48.34 - - <a class="wiki"  href="03/Sep/2007:08:53:16 -0700">03/Sep/2007:08:53:16 -0700</a> "POST /tiki-view_blog_post.php/1/2 HTTP/1.1" 200 - "-" "WordPress/2.0"<br />
217.23.143.226 - - <a class="wiki"  href="03/Sep/2007:08:53:31 -0700">03/Sep/2007:08:53:31 -0700</a> "POST /tiki-view_blog_post.php/1/2 HTTP/1.1" 200 - "-" "WordPress/2.0"<br />
217.23.133.242 - - <a class="wiki"  href="03/Sep/2007:08:53:39 -0700">03/Sep/2007:08:53:39 -0700</a> "POST /tiki-view_blog_post.php/1/5 HTTP/1.1" 200 - "-" "WordPress/1.9"<br />
217.23.151.130 - - <a class="wiki"  href="03/Sep/2007:08:53:45 -0700">03/Sep/2007:08:53:45 -0700</a> "POST /tiki-view_blog_post.php/1/5 HTTP/1.1" 200 - "-" "WordPress/1.9"<br />
217.23.143.224 - - <a class="wiki"  href="03/Sep/2007:08:53:50 -0700">03/Sep/2007:08:53:50 -0700</a> "POST /tiki-view_blog_post.php/3/19 HTTP/1.1" 200 - "-" "WordPress/2.1.2"<br />
217.23.132.114 - - <a class="wiki"  href="03/Sep/2007:08:53:54 -0700">03/Sep/2007:08:53:54 -0700</a> "POST /tiki-view_blog_post.php/3/19 HTTP/1.1" 200 - "-" "WordPress/2.1.2"<br />
212.24.48.31 - - <a class="wiki"  href="03/Sep/2007:08:53:58 -0700">03/Sep/2007:08:53:58 -0700</a> "POST /tiki-view_blog_post.php/2/7 HTTP/1.1" 200 - "-" "WordPress/2.0"<br />
217.23.143.26 - - <a class="wiki"  href="03/Sep/2007:08:54:02 -0700">03/Sep/2007:08:54:02 -0700</a> "POST /tiki-view_blog_post.php/2/7 HTTP/1.1" 200 - "-" "WordPress/2.0"<br />
212.24.48.52 - - <a class="wiki"  href="03/Sep/2007:08:54:04 -0700">03/Sep/2007:08:54:04 -0700</a> "POST /tiki-view_blog_post.php/3/9 HTTP/1.1" 200 - "-" "WordPress/2.1.2"</div><br />
<br />
Let's see, what are the options?<br />
<ul><li>Disallow trackback links? There goes the idea of wiki...
</li><li>Disallow user registrations? Where's the fun in that?
</li><li>Require user registrations to be manually approved, and require registration before trackback links are allowed?
</li><li>All of the above?
</li></ul>
<br />
Well, let's just first plain block the caravan.ru network out:<br />
<div class="simplebox">iptables -A INPUT -s 212.24.48.170/24 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 81.176.0.0/15 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 62.213.64.0/18 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 212.158.160.0/20 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 217.23.128.0/19 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 212.24.32.0/19 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 85.255.118.92/24 -p tcp --dport www -j droplog<br />
iptables -A INPUT -s 72.232.191.50 -p tcp --dport www -j droplog</div><br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Mon, 03 Sep 2007 16:11:44 +0100</pubDate>
        </item>
        <item>
            <title>SPAM on the rise...</title>
            <link>http://www.pointyhair.com/tiki-view_blog_post.php?blogId=3&amp;postId=19</link>
            <description><![CDATA[Is it just me, or have others noticed that SPAM is on the rise?<br />
<br />
It is really annoying when I get 100 SPAMs per day on the email account I use on my cell phone...<br />
<br />
Time to "tighten the screws" again!<br />
<br />
Links:<br />
<ul><li><a class="wiki" target="_blank" href="http://www.au.sorbs.net/using.shtml">SORBS</a>
</li><li><a class="wiki" target="_blank" href="http://www.spamcop.net/">SpamCop</a>
</li><li><a class="wiki" target="_blank" href="http://www.spamhaus.org/">SpamHaus</a>
</li><li><a class="wiki" target="_blank" href="http://www.netwinsite.com/surgemail/help/rbl.htm">RealTime blackhole lists</a>
</li><li><a class="wiki" target="_blank" href="http://ordb.org/links/">ORDB</a>
</li><li><a class="wiki" target="_blank" href="http://moensted.dk/spam/">Moensted.dk</a>
</li><li><a class="wiki" target="_blank" href="http://spews.org/faq.html">Spews</a> (use through SORBS)
</li><li><a class="wiki" target="_blank" href="http://spamsites.org/">SpamSites</a>
</li></ul>
<br />
So, I go through my sendmail.mc configuration, and notice that I could add a few blacklists again.<br />
<div class="simplebox"><pre>FEATURE(dnsbl, `relays.ordb.org', `Rejected -- see http://ordb.org/ for reason')dnl
FEATURE(dnsbl, `sbl-xbl.spamhaus.org', `Rejected -- see http://www.spamhaus.org/SBL for reason')dnl
FEATURE(dnsbl, `bl.spamcop.net', `Rejected -- see http://spamcop.net for reason')dnl
FEATURE(dnsbl, `dnsbl.sorbs.net', `554 Rejected see http://dnsbl.sorbs.net')dnl
FEATURE(dnsbl, `list.dsbl.org', `Rejected -- see http://dsbl.org for reason')dnl
FEATURE(dnsbl, `block.rhs.mailpolice.com', `Rejected -- see http://rhs.mailpolice.com')dnl
FEATURE(dnsbl, `cbl.abuseat.org', `Rejected -- see http://cbl.abuseat.org')dnl
FEATURE(dnsbl, `l1.spews.dnsbl.sorbs.net', `Rejected -- see http://spews.org')dnl</pre></div><br />
Basically I ended adding dnsbl.sorbs.net and l1.spews.dnsbl.sorbs.net<br />
<br />
Results are good:<br />
<ul><li>This morning; 450 messages, 110 internal => external emails: 340
</li><li>SPAM (Blacklist) blocked: 259, i.e. 76%
</li><li>Bad targets (cleaning up mailboxes): 17, i.e. 5%
</li><li>Caught by SORBS: 58, i.e. 17% (that weren't caught by the others), so now 17% more gets caught
</li></ul>
<br />
Good work for a quiet Sunday morning, though I wish I could find a good <a class="wiki" target="_blank" href="http://www.snertsoft.com/download.php">milter</a> in open source, to do better &mdash; and not rely so much on blacklists.<br />
<br />
]]></description>
            <author>Taneli Otala</author>
            <pubDate>Sun, 15 Oct 2006 16:00:39 +0100</pubDate>
        </item>
    </channel>
</rss>
