NAT settings, multiple public IP addresses

Hi everyone, hopefully someone can help me on this.

What I have is:

Single Asterisk server
2 independent SIP providers
2 independent ISPs

Currently Asterisk box is working fine to SIP provider 1 using ISP 1, obviously with my public IP of ISP 1 in the NAT settings section.

What I would like to do is add SIP provider 2 onto the box via ISP 2

I have already configured the routing on the firewall to send traffic to SIP prov 1 via wan1 and SIP prov 2 via wan2, and configured inbound as needed as well. Problem is I only have 1 public IP setting in the NAT settings bit so I assume it is not going to work still.

Has anyone done this in the past and can suggest whether it is possible. I wondered whether there is anyway for me to add the NAT bit into the trunk settings rather than it being global or something like that.

Thanks very much


Because NAT essentially tells the outside world what IP to send data to, I’m guessing it would be impossible to route that way.

I think with iptables you can define routes, but you’ll have to most likely disable(?) NAT when you use multiple routes.

I could be incredibly wrong.

No, you can’t add NAT in a peer it’s a global setting.

You could add another interface, install a firewall on the machine such as APF and then use static routes.