How to Get Trixbox Working Behind a NAT Firewall

trixbox is a line of Asterisk-based IP-PBX products designed to meet the needs of companies from 2 to 500 employees. trixbox is available in a free open source Community Edition. If you are experimenting with trixbox at home, then you are probably in the situation where you have trixbox running on your home network which is behind a Firewall that uses NAT. Here is how to get your trixbox intall communicating outside of your home network:

  1. Be sure the LAN/Private address is statically assigned to the Trixbox server.
  2. Forward the following ports on your firewall to your Trixbox server IP:
    • UDP Port 5060 is for SIP communication.
    • UDP Port 5060-5082 range, SIP communications.
    • TCP Port 5060 is for SIP but thought to be rarely used.
    • UDP Port 10000 – 20000 is for RTP – the media stream, voice/video channel.
  3. You must also edit the sip_nat.conf file. Go to Trixbox home page, then select administrator mode. Select from PBX -> Config File Editor, click on sip_nat.conf and insert the following lines:
    • If you have a static external IP address:
      • Externip = your_external_ip_address
      • localnet = machine/
    • If you have a dynanic IP external IP address, use a dynamic IP address hosting service like
      • externhost =
      • externrefresh = 5 (which means lookup hostname every 5 minutes to refresh ip adress)
      • localnet = machine/

Then click on update and then “Re-Read Configs”. Or just restart the Trixbox machine.


One thought on “How to Get Trixbox Working Behind a NAT Firewall”

Leave a Reply

Your email address will not be published. Required fields are marked *