Gentoo Archives: gentoo-user

From: Marc LEURENT <lftsy@××××.fr>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Easy way to know its public IP address
Date: Thu, 11 Oct 2007 15:11:56
Message-Id: 470E38F2.5000404@free.fr
In Reply to: Re: [gentoo-user] Easy way to know its public IP address by Hans-Werner Hilse
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Ok, the stun client command seems to be my answer!!
5 I get my external IP address, and the type of NAT I'm using: Indepndent Mapping, Port Dependent Filter, preserves ports, no hairpin
6
7 Have a nice day
8
9 example:
10
11 lftsy@leonhart:[~/../stund]$ ./client stunserver.org -v
12 STUN client version 0.96
13 Opened port 18804 with fd 3
14 Opened port 18805 with fd 4
15 Encoding stun message:
16 Encoding ChangeRequest: 0
17
18 ...............
19 .................
20
21 About to send msg of len 28 to 62.210.194.120:18804
22 test I = 1
23 test II = 0
24 test III = 0
25 test I(2) = 1
26 is nat = 1
27 mapped IP same = 1
28 hairpin = 0
29 preserver port = 1
30 Primary: Indepndent Mapping, Port Dependent Filter, preserves ports, no hairpin
31 Return value is 0x000017
32
33
34
35 Hans-Werner Hilse a écrit :
36 > Hi,
37 >
38 > On Thu, 11 Oct 2007 14:43:15 +0200 Marc LEURENT <lftsy@××××.fr> wrote:
39 >
40 >> I would like to know how is it possible to quickly know its public IP
41 >> address behind a NAT from the console... I'm using links + a My IP
42 >> search but it sucks....
43 >
44 > You can craft a similar service that just reports the querying IP. You
45 > can e.g. do without the HTTP protocol and just setup a simple server,
46 > e.g. using ucspi-tcp, which sets the TCPREMOTEIP environment variable.
47 >
48 > Then you can just use netcat. Of course, for all this you'll need a
49 > server on the net.
50 >
51 > OTOH, you could just ask your gateway, if there are means to that (you
52 > didn't tell us anything about it).
53 >
54 > And what different methods of NAT are you talking about in this context?
55 >
56 >
57 > -hwh
58 -----BEGIN PGP SIGNATURE-----
59 Version: GnuPG v1.4.7 (GNU/Linux)
60 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
61
62 iD8DBQFHDjjxqjpLE0HiOBYRAvRdAJ98IJlBz8TsZO1MBKuQ7VT6pCdwbwCfXmhD
63 hFFo/xuB34F3Ml3rEsp0hoM=
64 =uB/h
65 -----END PGP SIGNATURE-----
66 --
67 gentoo-user@g.o mailing list