Networking Forums

Networking Forums > Computer Networking > Linux Networking > Identify External IP address

Reply
Thread Tools Display Modes

Identify External IP address

 
 
Brian Andrus
Guest
Posts: n/a

 
      02-25-2004, 07:15 PM
I have some systems with which I need to identify (preferably through
a perl script) the IP address that external traffic is going out on.

Each system has 3 nics and eth2 is connected to the internet. SOME of
them use PPPoE, some are DHCP and some are static. On the PPPoE
systems, the ip I need is associated with ppp0, not eth2.

I am thinking a crossref of 'ifconfig |grep inet' and 'route -n|grep
^0.0.0.0' will work, but I am hoping there is a simpler way.

Any help is appreciated. Thanks in advance.

Brian Andrus
batman (at) thundermail com
 
Reply With Quote
 
 
 
 
Dennis Jung
Guest
Posts: n/a

 
      02-26-2004, 08:31 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Brian

> I have some systems with which I need to identify (preferably through
> a perl script) the IP address that external traffic is going out on.


I have had the same problem and found an easy way to figure out my
dynamically changing ip adress.

Just open the following site: http://checkip.dyndns.org

mfg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAPbzjYsjXBFGzV80RAtLoAJ9jZpYBdJ0Cig2aZcE7VW k1JLhStQCfdwjR
pfVmB7KzW2S1/opDtFXCtV8=
=oTya
-----END PGP SIGNATURE-----
 
Reply With Quote
 
jack
Guest
Posts: n/a

 
      02-26-2004, 04:52 PM
Brian Andrus wrote:
> I have some systems with which I need to identify (preferably through
> a perl script) the IP address that external traffic is going out on.
>
> Each system has 3 nics and eth2 is connected to the internet. SOME of
> them use PPPoE, some are DHCP and some are static. On the PPPoE
> systems, the ip I need is associated with ppp0, not eth2.


With pppd, You can use the ip-up script. It will be called with the
IP as one of its arguments upon connecting.


Cheers, Jack.

--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing external address to loopback Björn Keil Linux Networking 2 05-17-2008 01:02 PM
Using internal services via external IP address Scottatron Linux Networking 2 05-03-2007 11:51 PM
Getting my external IP address Dave Rudolf Network Routers 3 12-18-2006 04:01 AM
NAT port forward to external IP address Niels Windows Networking 4 07-15-2004 01:52 PM
External IP address with router dirtycow Home Networking 5 05-03-2004 08:47 AM



1 2 3 4 5 6 7 8 9 10 11