• contact
  • about
Home

double nat sip with asterisk

rene — Tue, 03/09/2010 - 20:21

This config works by port forwarding RTP traffic to the asterisk and ATA on both ends. From what I've seen SIP does not handle RTP traffic well with double NAT when port forwarding of RTP it not used.

I've got the following network topology. The far left is an asterisk box I terminate all my VOIP calls through. The far right is my ATA and desk phone, a sipura spa2000.

This is how I do double nat sip with asterisk.

On the asterisk end far left, sip.conf has this in the general section

externip=198.51.100.100
localnet=10.20.20.0/255.255.255.0

For the account I have for my ATA to authenticate I have this
[sipura]
nat=yes
canreinvite=yes

In rtp.conf I lock RTP traffic to ports 10000 through to 10100
rtpstart=10000
rtpend=10100

On the far left Linux router I port forward the following
ingress port 5060/udp on 198.51.100.100 to port 5060/udp on 10.20.20.2
ingress ports 10000-10100/udp on 198.51.100.100 to ports 10000-10100/udp on 10.20.20.2

Now over to the right side which is my office. On the far right dsl router I port forward the following

ingress ports 10000-10100/udp on 203.0.113.100 to ports 10000-10100/udp on 192.168.100.100

The dsl router allows me to add static routes. 192.168.100.0/24 is routed via 10.10.10.2 on the dsl router. Another way I could of done this was to add the 10.10.10.2 to a DMZ (which most dsl routers support) and then port forward 10000-10100/udp to 192.168.100.100 on the linux router.

Within the Sipura config I lock RTP traffic to ports 10000-10100/udp


photos im taking

Pancakes in the afternoon. NOMsThe Cuckoo in Olindaeastern beach, GeelongGeelong maestrohawthorn vs Geelong at the MCGSt Marys church in GeelongseaplaneMEGANOMSChristmas in July at Ms Marplesfound in old album store in sassafrasoutside tea store in sassafrasEarl and green teaphoto.JPGantique store in the dandenongschicken parmigiana at rangersbruschetta at rangers in the dandenongstimeball towerDO NOT USE 50 cents!!!veggie patch week 2Photo1.jpgPhoto1.jpgNOMS!!$@photo.JPGred shoesphoto.JPGRBGdance Eugene, dancejust hanging outRoyal Botanical Gardens in MelbourneRoyal Botanical Gardens in Melbourne

about me


Passionate Systems Engineer.
Want to know more?

connect with me

search rene.bz

what im reading

  • Pivoting 101
  • A word of advice from my father about being frugal.
  • Fighting the summer productivity blahs
  • App Update: BlurFX
  • The elements of change
  • The Life Changing Nature of Gratitude
  • Evernote Essentials: The definitive guide to using Evernote
  • 9 Expert Tips For Better Writing
  • Coburg, Melbourne #iphoneography
  • Media Exponential
  • Little Collins St, Melbourne #iphoneography
  • Google I/O 2010 - Making Freemium work
  • The 8 lies that software developers tell
  • Coburg, Melbourne #iphoneography
  • TED talks – What the world needs
  • It’s As If Apple Has Hired Don Draper
  • TechCrunch TV: Speaking Of… Detroit, Featuring Scott and Jay Adelson
  • Why the World Needs Google TV
  • Federation Square No. 4, Melbourne #iPhoneography
  • North Melbourne Station
more

what im bookmarking

  • mmmmail! - Free disposable Email to RSS service.
  • The New York Times > Style > Slide Show > Single Space
  • Puppet - Using Multiple Environments - Puppet Labs
  • Muscle Beach
  • Doctrine - Doctrine ORM for PHP - Coding Standards
  • Using CPAN with a non-root account
  • AdvancedNetworking - cobbler - Trac
  • Simple jQuery Tabs Plugin
  • HTML5 Demos and Examples
  • When can I use...
  • Les RPM de Remi - enterprise - 5 - remi - x86_64
  • RPM Search RedHat EL 5 mysql-5.1.48-1.el5.remi.1.i386.rpm
  • Index of /SRPMS
  • AspireOne/AO751h - Community Ubuntu Documentation
  • Vel2010
  • InterfaceLIFT: Wallpaper sorted by Date
  • Software « michaeldehaan.net
  • about-company | Next New Networks
  • PHP 5.3.2 RPMs for CentOS 5.4
  • Slicehost Forum - CentOS 5.4 and PHP 5.3.2
more

podcasts im listening to

  • Shot of Jaq » The War Of The Editors
  • Shot of Jaq » Marketing Or Madness?
  • Shot of Jaq » Web vs. Desktop
  • Shot of Jaq » The Lobbyist’s Recipe
  • Shot of Jaq » Later, Data
more
  • contact
  • about