<coma_killen / fastmail.fm> wrote in message
news:20020930093428.127DE2FD13 / server4.fastmail.fm...
> Hi,
>
> I'm sometimes behind a NAT/Firewall and want to get
> my external IP adress that people from outside the NAT
> can use to connect to me.
>
> How can I get that from (a pure) Ruby (solution)?

That may not at all be trivial. You have an internal network address and a
portnumber for the communication. The NAT router has these data and makes
the translation. But there is no obvious way you can get access to how the
NAT router makes this translation.

I'm no expert on the subject, but I'd say that you know the external IP
while configuring the NAT router and you can then configure the router to
map portnumbers on the public IP address to a specific internal IP address
and port number.

If you are dealing with dynamic IP, don't.

In Denmark you can rent your own Linux box hosted at the ISP for about $70 a
month. It's about the same as an ADSL connection with fixed IP, but with
more bandwidth. You can also provide you own hosted hardware but it's not
significantly cheaper.

Mikkel