Port forwarding to 2 devices

I support an Asterisk server located behind NAT running Asterisk 11, soon to be replaced with another box running Asterisk 16. At home I run a similar Asterisk server, and connect the two using IAX2. All is working well. Several years ago I set up a remote office with an ATA and it has been running fine since. It is also behind NAT.

Now I need to set up another remote office with a SIP phone, and I am trying to configure it and test it from home. I am confused about port forwarding. I know I can specify different ports for IAX and SIP signaling in iax.conf and sip.conf, and forward those ports at home to the SIP phone and the Asterisk server, but how do I specify separate ranges of RTP ports for forwarding at home? Or, does the endpoint tell Asterisk which range of ports to use for RTP?

In regards to SIP:

Asterisk tells the endpoint where to send media destined for it.
The endpoint tells Asterisk where to send media destined for it.

If you’ve forwarded the RTP ports to Asterisk and configured it to know it is behind NAT, then there is nothing else to do on the side where Asterisk is unless you are only allowing specific IP addresses through the firewall. In that case you would need to add the other IP address to your firewall.

For IAX2:

Forwarding the single port to Asterisk is all that is required, although the same “if you’re only allowing certain IPs through your firewall” applies.

Very helpful! Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.