Interesting NAT problem

Ok… I’ve got my asterisk box running on a machine where eth0 is a public IP and eth1 is a private subnet. Asterisk is running and ONLY bound to the PUBLIC IP address… (so not using NAT)… The workstations (and SIP PHONE) are on the private subnet (192.168.X.X) but are configured to use the PUBLIC IP 68.191.X.X address as the proxy and SIP server…

This setup should work just fine and have no problem with NAT becasuse the whole server setup is on a public IP address… however as SOON as I turn NAT on so my workstations can surf the internet POOF… I start getting ICMP destination unreachable messages (TCPDUMP) and I can hear someone calling me but they can’t hear me… (Asterisk full log says that the bridging of the call failed)…

I don’t get it? Astersik is completely running on a public IP with no NAT on that IP… but literally as SOON as I turn off NAT in iptables… it works… In fact for giggles I tried literally setting up the NAT so that it ONLY NAT’ed out the IP of my workstation (not my SIP phone) which guaranteed that NO connection in the phone call is using NAT in any way/shape form… It’s almost as if when I turn on iptables NAT implementation its doing something different to the routing or something…

Any ideas?

Thanks,
Dan.Creed@thecreeds.net

Hi

Not 100% sure what you are trying to acheive,

But why not have sip bind to both interfaces and the phone register the the private one and peers use the public one?

Also have you got the “localnet” and canreinvite setup correctly?

Ian

It doesn’t seem to like it running on both interfaces… and canreinvite=no on everything… so Asterisk is the control point… I’m not using localnet because its not bound anywhere to localnet…

Hi

Hmmm, Runs fine on all the systems Iv deployed this way.

But you do need to define the localnet and externip address to get it to work.

You will need to look at the sip debug, to work out whats going on.

I dont suppose you can post Snippets of you Extensions.conf and your SIP.conf can you?

Might make it easier to understand what you have going on here. I have the same setup as what you have and don’t have any problems at all.

I would like to compare what you have against my one, and possibly others on these forums might also detect what configs may not be correct.

Cheers,

David.