Christopher Stephens
2003-Oct-28 15:00 UTC
[Asterisk-Users] SIP behind NAT, workaround to make W Snel's very welcome fix work both for inside *and* outside clients
Hello everyone and welcome to my first post to the list! After studying for a couple of weeks, I finally built * for the first time last night, and of course had the same SIP-behind-NAT woes that plague all of us who use NATted connections. It was therefore with no small joy that I read the fix for that that Walter Snel proposed (q.v.: http://lists.digium.com/pipermail/asterisk-users/2003-October/024968.html). Since I currently have no zaptel hardware (though intend to get some within the week) and thus use soft (SIP) clients on the same internal network, the caveat that it would break internal SIP clients was, for me, a reason to not yet implement his fix. I was examining chan_sip.c, trying to think of a way to implement his 'Naturally it would be much better to make this behavior:', and while bemoaning my pathetic C skills, thought of another solution: -CUT HERE TO GET RIGHT TO THE POINT :P- 1) Somehow (I use dynamic DNS) get a FQDN to point to the IP of the outside of your NAT box; 2) Implement W Snel's hardcoding as in the above URL, using your chosen FQDN where, in his example, he has 213.84.4.39; 3) On any internal machine with a SIP client, add an entry to the hosts file that points your chosen FQDN to the * server's IP on the *internal* network. What do you all think? I won't have an opportunity to try to implement this until later this evening, but at that time will post a follow-up to let you know how it went. -Chris
Brian West
2003-Oct-28 15:15 UTC
[Asterisk-Users] SIP behind NAT, workaround to make W Snel's very welcome fix work both for inside *and* outside clients
Honestly I can't see all these NAT woes people speak of... I have * on a public ip .. sip.conf entries with nat=yes load em up.. and they work. So I have yet to see why everyone has SO MANY problems. bkw On Tue, 28 Oct 2003, Christopher Stephens wrote:> Hello everyone and welcome to my first post to the list! > > After studying for a couple of weeks, I finally built * for the first > time last night, and of course had the same SIP-behind-NAT woes that > plague all of us who use NATted connections. > It was therefore with no small joy that I read the fix for that that > Walter Snel proposed (q.v.: > http://lists.digium.com/pipermail/asterisk-users/2003-October/024968.html). > Since I currently have no zaptel hardware (though intend to get some > within the week) and thus use soft (SIP) clients on the same internal > network, the caveat that it would break internal SIP clients was, for me, > a reason to not yet implement his fix. I was examining chan_sip.c, trying > to think of a way to implement his 'Naturally it would be much better to > make this behavior:', and while bemoaning my pathetic C skills, thought > of another solution: > > -CUT HERE TO GET RIGHT TO THE POINT :P- > 1) Somehow (I use dynamic DNS) get a FQDN to point to the IP of the > outside of your NAT box; > 2) Implement W Snel's hardcoding as in the above URL, using your chosen > FQDN where, in his example, he has 213.84.4.39; > 3) On any internal machine with a SIP client, add an entry to the hosts > file that points your chosen FQDN to the * server's IP on the *internal* > network. > > What do you all think? > I won't have an opportunity to try to implement this until later this > evening, but at that time will post a follow-up to let you know how it > went. > > -Chris > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
Maybe Matching Threads
- Fwd: Re: SIP behind NAT, workaround to make W Snel's very welcome fix work both for inside *and* outside clients
- Asterisk behind nat with hole, hardcoding solution
- Samba and non-ascii characters
- Remote identity management
- Asterisk both behind a NAT and outside at the same time