[Asterisk-Users] Asterisk behind NAT -- SIP config file
Rudolf Ladyzhenskii
rudolfl at optusnet.com.au
Fri Mar 4 19:41:23 MST 2005
Hi, all
This is the souktion that worked for me.
Here is my config again
>> PHONE 1 ------ * BOX
>> |
>> NAT/Firewall
>> |
>> |
>> NAT/Firewall
>> |
>> |
>> PHONE 2
Firewall on Asterisk end is Linux RH9 with iptables.
I have set it up to forward ports 5060, 10000-20000 to Asterisk.
Firewall at PHONE 2 end is an off-the-shelf router. Firewall was disabled
and I port forwarded port 5060 to the phone.
Here is my sip.conf file: (PHONE1 is ext101, PHONE2 is ext102).
; SIP configuration file
[general]
port=5060
bindaddr=0.0.0.0
context=default
externip=<my poublic ip>
localnet=192.168.1.0/24
[ext101]
type=user
host=dynamic
secret=ext101
context=default
[ext101]
type=peer
secret=ext101
host=dynamic
context=default
callerid="Ext 101"
[ext102]
type=user
nat=yes
host=dynamic
secret=ext102
context=default
canreinvite=no
[ext102]
type=peer
nat=yes
secret=ext102
host=dynamic
context=default
callerid="Ext 102"
canreinvite=no
Hope it helps.
Rudolf
More information about the asterisk-users
mailing list