Re: knowing my IP address behind NAT firewall

2005-06-01 Thread Roel Schroeven

dexter2 wrote:

Hi,
i'm connected to internet via DSL line. I have DSL modem with 4 eth
ports. DSL modem serve also as NAT firewall.
Each time i connect to internet, i have diferent IP, that my ISP assign
to me. If i want to know my IP, that i use on internet, I have to
connect to DSL modem via HTTP and read it there. 
Is there a unix command, that will get my internet IP? How does this

command get this IP?
It must be posible, becouse Valknut is able to get my actual internet
IP.


ddclient is able to read the address via HTML from many kinds of 
routers; is just fetches the page and finds the IP address with a 
regular expression, I guess.


I find that with my setup checking up on http://checkip.dyndns.org works 
better. I suspect Valknut uses a similar approach.


--
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: knowing my IP address behind NAT firewall

2005-05-31 Thread Lee Braiden
On Tuesday 31 May 2005 23:48, Roberto C. Sanchez wrote:
> On Tue, May 31, 2005 at 11:25:10PM +0100, Lee Braiden wrote:
> > ping -c 1 hop www.google.com | grep 'bytes from' | cut -d ' ' -f 5 | cut
> > -d '(' -f 2 | cut -d ')' -f 1
>
> Try this:
> lynx -dump http://checkip.dyndns.org |sed -n '/Current/s/.*: \(.*\)/\1/p'
>
> It doesn't rely on ICMP packaets, which are blocked by many ISPs and/or
> network admins.

I guess the hop thing is unreliable, then?

p.s.: Dexter, you might be able to use Roberto's example to parse the output 
of the webserver built into your router.  That would be awkward on my router, 
but I've heard of other people doing that.  Not sure if it was easy on 
theirs, or if they just liked hard work ;)

-- 
Lee.

Please do not CC replies directly to me.  I'll read them on the list.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: knowing my IP address behind NAT firewall

2005-05-31 Thread Roberto C. Sanchez
On Tue, May 31, 2005 at 11:25:10PM +0100, Lee Braiden wrote:
> 
> Since you asked, and I had wondered about this myself previously, I just 
> worked it out (or, rather, stumbled across it).  The following works for me:
> 
> ping -c 1 hop www.google.com | grep 'bytes from' | cut -d ' ' -f 5 | cut -d 
> '(' -f 2 | cut -d ')' -f 1
> 
> Since the ping manpage doesn't actually seem to explain what the hop keyword 
> does, I'd love to know... :)

Try this:

lynx -dump http://checkip.dyndns.org |sed -n '/Current/s/.*: \(.*\)/\1/p'

It doesn't rely on ICMP packaets, which are blocked by many ISPs and/or
network admins.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr


pgpPU6Q3wYuOj.pgp
Description: PGP signature


Re: knowing my IP address behind NAT firewall

2005-05-31 Thread Lee Braiden
On Tuesday 31 May 2005 22:22, dexter2 wrote:
> Each time i connect to internet, i have diferent IP, that my ISP assign
> to me. If i want to know my IP, that i use on internet, I have to
> connect to DSL modem via HTTP and read it there.
> Is there a unix command, that will get my internet IP? How does this
> command get this IP?
> It must be posible, becouse Valknut is able to get my actual internet
> IP.

I don't want to encourage anyone to ask questions that can be found in other 
ways, *but*... :)

Since you asked, and I had wondered about this myself previously, I just 
worked it out (or, rather, stumbled across it).  The following works for me:

ping -c 1 hop www.google.com | grep 'bytes from' | cut -d ' ' -f 5 | cut -d 
'(' -f 2 | cut -d ')' -f 1

Since the ping manpage doesn't actually seem to explain what the hop keyword 
does, I'd love to know... :)

-- 
Lee.

Please do not CC replies directly to me.  I'll read them on the list.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: knowing my IP address behind NAT firewall

2005-05-31 Thread Roberto C. Sanchez
On Tue, May 31, 2005 at 11:22:42PM +0200, dexter2 wrote:
> Hi,
> i'm connected to internet via DSL line. I have DSL modem with 4 eth
> ports. DSL modem serve also as NAT firewall.
> Each time i connect to internet, i have diferent IP, that my ISP assign
> to me. If i want to know my IP, that i use on internet, I have to
> connect to DSL modem via HTTP and read it there. 
> Is there a unix command, that will get my internet IP? How does this
> command get this IP?
> It must be posible, becouse Valknut is able to get my actual internet
> IP.
>   Thanks
>  Dexter2

This has been discussed more than once.  Please search the list archives
at http://lists.debian.org and look for those threads.

-Roberto
-- 
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr


pgpYL3VfSRbhz.pgp
Description: PGP signature