<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Some switches/routers also support SNMP interrogation of public IP address.  I take advantage<div>of this at home to keep track of my own IP.<br><div><br><div><div>On Feb 1, 2012, at 6:54 AM, Max Bourinov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Our corporate clients use static IP for such tasks. Maybe it is possible to have static IP?</div><br clear="all"><div>Best regards,</div><div>Max</div><br><br>
<br><br><div class="gmail_quote">On Wed, Feb 1, 2012 at 4:54 PM, eigenfunction <span dir="ltr"><<a href="mailto:emeka_1978@yahoo.com">emeka_1978@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

@Edward<br>
You are right and thank you again for your help<br>
<br>
@Michael<br>
I am in a corporate intranet, so i do not have access to the outside<br>
world and there are a couple of nats between the networks.<br>
<div class="im HOEnZb"><br>
On 1 Feb., 14:37, Edward Wang <<a href="mailto:edward.yu.w...@gmail.com">edward.yu.w...@gmail.com</a>> wrote:<br>
> A tcp server itself is simple enough, but that's another piece of<br>
> software running on a separated machine. That's a big disadvantage. On<br>
> the other hand, a UPnP control point is something you can integrate<br>
> into your own application, given your NAT device speaks UPnP and you<br>
> want to deal with the protocol.<br>
><br>
> -Edward<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> On Wed, Feb 1, 2012 at 9:19 PM, eigenfunction <<a href="mailto:emeka_1...@yahoo.com">emeka_1...@yahoo.com</a>> wrote:<br>
> > Thank you for the response. But before i wade into that territory,<br>
> > do you think it will be easier than just writing a tcp server?<br>
> > Anyway, i am going to check that out.<br>
><br>
> > On 1 Feb., 10:50, Edward Wang <<a href="mailto:edward.yu.w...@gmail.com">edward.yu.w...@gmail.com</a>> wrote:<br>
> >> If your NAT device supports UPnP, you can ask for its external address<br>
> >> using UPnP protocol. But there's nothing simple in it. UPnP is a<br>
> >> horrible protocol.<br>
><br>
> >> That said, if you do want to try this, you can check out UPnP<br>
> >> implementation in etorrent. I did that about one year ago for opening<br>
> >> port mapping. The related source code are<br>
> >> (<a href="https://github.com/edwardw/etorrent/tree/master/apps/etorrent/src" target="_blank">https://github.com/edwardw/etorrent/tree/master/apps/etorrent/src</a>):<br>
><br>
> >>     etorrent_upnp_sup.erl<br>
> >>     etorrent_upnp_proto.erl<br>
> >>     etorrent_upnp_net.erl<br>
> >>     etorrent_upnp_handler.erl<br>
> >>     etorrent_upnp_entity.erl<br>
><br>
> >> They are quite standalone and complete UPnP implementation. Take a<br>
> >> look at how add_port_mapping is implemented:<br>
> >>    <a href="https://github.com/jlouis/etorrent/blob/master/apps/etorrent/src/etor." target="_blank">https://github.com/jlouis/etorrent/blob/master/apps/etorrent/src/etor.</a>..<br>
> >> It should be easy enough to add your own get_external_address<br>
> >> function, which is defined in following specification:<br>
> >>    <a href="http://upnp.org/specs/gw/UPnP-gw-WANIPConnection-v1-Service.pdf" target="_blank">http://upnp.org/specs/gw/UPnP-gw-WANIPConnection-v1-Service.pdf</a><br>
><br>
> >> Regards,<br>
> >> Edward<br>
><br>
> >> On Wed, Feb 1, 2012 at 4:25 PM, eigenfunction <<a href="mailto:emeka_1...@yahoo.com">emeka_1...@yahoo.com</a>> wrote:<br>
> >> > Hi everybody,<br>
> >> > i have an erlang application running behind a nat. Now i have come to<br>
> >> > a point where i need to know my public ip. I was thinking about<br>
> >> > running a tiny tcp server behind the nat whose sole purpose would be<br>
> >> > to send me my public ip. My question is this: isn't there a more<br>
> >> > simple alternative? Heck, even if i could determine the public ip of<br>
> >> > the NAT device without doing a "backflip" it will be enough for my<br>
> >> > case.<br>
> >> > Any idea?<br>
> >> > _______________________________________________<br>
> >> > erlang-questions mailing list<br>
> >> > <a href="mailto:erlang-questi...@erlang.org">erlang-questi...@erlang.org</a><br>
> >> ><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
> >> _______________________________________________<br>
> >> erlang-questions mailing list<br>
> >> erlang-questi...@erlang.orghttp://<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">erlang.org/mailman/listinfo/erlang-questions</a><br>
> > _______________________________________________<br>
> > erlang-questions mailing list<br>
> > <a href="mailto:erlang-questi...@erlang.org">erlang-questi...@erlang.org</a><br>
> ><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> erlang-questi...@erlang.orghttp://<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">erlang.org/mailman/listinfo/erlang-questions</a><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></div></div></body></html>