<br><br><div class="gmail_quote">On Sun, Oct 25, 2009 at 3:32 PM, Bruno Wolff III <span dir="ltr"><<a href="mailto:bruno@wolff.to">bruno@wolff.to</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sun, Oct 25, 2009 at 14:17:48 +0000,<br>
  Timothy Murphy <<a href="mailto:gayleard@eircom.net">gayleard@eircom.net</a>> wrote:<br>
> Sam Varshavchik wrote:<br>
><br>
> >> I had a little program which I ran each day<br>
> >> as a cron job to mail me the IP address of a machine<br>
> >> in a different country.<br>
> ...<br>
> >> In any case, the program has ceased to work<br>
> >> because the site heliohost seems to have gone off-line.<br>
><br>
> > You don't need to use any site. The sender's IP address will be recorded<br>
> > in the test message's headers.<br>
><br>
> Thanks very much for that suggestion.<br>
> I've looked at KMail showing all headers,<br>
> and there are a couple of IP addresses which could be the correct ones:<br>
<br>
</div>If your mail is going through the ISPs mail server, then it could potentially<br>
do things that make it hard to get the IP address you want.<br>
<br>
You could note other kinds of direct connections to your machine. For example<br>
you could note http connections to a url at your machine that isn't<br>
published or discoverable.<br>
<div><div></div><div class="h5"><br><br></div></div></blockquote><div><br>If the game is not to use any external server, then<br>you can use your own computer to ping back the address.<br>Just install an script in /var/www/cgi-bin/ in your local computer and<br>
call <a href="http://ipget.pl">ipget.pl</a> from your remote computer. Then, you can email<br>your external IP to wherever you want:<br><br>#!/usr/bin/perl -wT<br># ipget.pl- the script that retrieves your IP for you. Run this on the box<br>
# whose IP you want to figure out. You can make this part of a larger program,<br># obviously.<br>use LWP::Simple;<br>$numArgs = $#ARGV + 1;<br># print "$numArgs arguments.\n";<br>if ($numArgs == 0) {<br>  print "using server1: ";<br>
  $host = "<a href="http://external-computer1-name/cgi-bin/ipreport.cgi">http://external-computer1-name/cgi-bin/ipreport.cgi</a>";<br>}<br>else {<br>  print "using server2: ";<br>  $host = "<a href="http://external-computer2-name/cgi-bin/ipreport.cgi">http://external-computer2-name/cgi-bin/ipreport.cgi</a>";<br>
}<br>my $ip=get($host);<br>print $ip;<br> </div></div>-----------------------------------------------------<br><br>#!/usr/bin/perl -wT<br># ipreport.cgi- the script that sits external to your router<br>use strict;<br>use CGI;<br>
my $q=CGI->new();<br>print $q->header().$q->remote_addr()."\n";<br><br clear="all"><br>-- <br>Paulo Roma Cavalcanti<br>LCG - UFRJ<br>