<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Arial","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:99.25pt 30.0mm 30.0mm 30.0mm;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026">
<v:textbox inset="5.85pt,.7pt,5.85pt,.7pt" />
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=JA link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=WordSection1>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Hi, a year and a
few months ago, this feature did not exist and was not on the radar yet:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><a
href="http://www.mail-archive.com/asterisk-dev@lists.digium.com/msg37756.html">http://www.mail-archive.com/asterisk-dev@lists.digium.com/msg37756.html</a><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Has there been any
progress, plans, or other on adding this since then?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>If not, I have
been having a dog of a time trying to create a work around for this on the
Asterisk box (Ubuntu 10.04 LTS). Asterisk is 1.4.33.1 compiled with the patch
for registering to router rt200ne (<a
href="http://voip-info.jp/index.php/RT-200NE%E5%AF%BE%E5%BF%9C%E3%83%91%E3%83%83%E3%83%81">http://voip-info.jp/index.php/RT-200NE%E5%AF%BE%E5%BF%9C%E3%83%91%E3%83%83%E3%83%81</a>).<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>NTT RT-200NE
router at 192.168.40.1<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Asterisk Server:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>eth0 192.168.40.2<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>eth1 192.168.40.3<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>I have tried the
following and nearly made it work but still not dice:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>iptables -t nat -A
OUTPUT -p all -d 192.168.40.3 -j DNAT --to-destination 192.168.40.1<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>(Note: -A
PREROUTING did not work at all but -A OUTPUT got me closer)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>iptables -t nat -A
POSTROUTING -p all -j MASQUERADE<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>iptables -t nat -n
-L<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Chain PREROUTING
(policy ACCEPT) target prot opt source destination <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Chain POSTROUTING
(policy ACCEPT)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>target prot
opt source destination <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>MASQUERADE all
-- 0.0.0.0/0 0.0.0.0/0 <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Chain OUTPUT
(policy ACCEPT)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>target prot opt
source destination <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>DNAT all --
0.0.0.0/0 192.168.40.3 to:192.168.40.1 <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>"ping
192.168.40.3 -I eth1" and "ping 192.168.40.3" both work fine.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>I can access the
router and login to it via http://192.168.40.3/. Therefore port 80 is working.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>route -n<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Receipt Site Gateway
Netmask Flags
Metric Ref Use # Interface<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>192.168.40.1 0.0.0.0
255.255.255.255 UH 0
0 0 eth0<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.0.0.0
192.168.40.1 0.0.0.0 UG
0 0 0 eth0<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>ip route show<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>192.168.40.1 dev
eth0 proto static scope link<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>default via
192.168.40.1 dev eth0 proto static <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>ip rule show<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0: from all lookup
local<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>32766: from all
lookup main<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>32767: from all
lookup default <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>ip addr show<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1: lo:
<LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>link/loopback
00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo etc....<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>2: eth0:
<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN
qlen 1000<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>inet
192.168.40.2/32 brd 192.168.40.2 scope global eth0 etc....<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>3: eth1:
<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen
1000<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>inet
192.168.40.3/32 brd 192.168.40.3 scope global eth1 etc....<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>5: eth2:
<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen
1000<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>etc....<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>(eth2 is currently
down)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>In sip.conf:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>bindport=5060<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>bindaddr=0.0.0.0<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>rt200ne=192.168.40.1<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>rt200ne=192.168.40.3<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>register =>
3:username:password@192.168.40.1/123456789<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>will register but<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>register =>
3:username:password@192.168.40.3/123456789<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>will not register<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Any ideas why ping
and http to 192.168.40.3 is successfully directed to<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>192.168.40.1 but
the asterisk registration to 192.168.40.3 on port 5060 is<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>not? Any ideas as
to things to try to get this workaround or another workaround to solve the
issue?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Thanks!!<o:p></o:p></span></p>
</div>
</body>
</html>