Determining IP addr via script?

Andrew Mathews andrew_mathews
Mon May 17 11:34:35 PDT 2004


Michael Hipp wrote:
> I have a Linux box behind a LinkSys NAT router that gets a public address 
> from DSL on the WAN side. I'm wanting to be able from the Linux box to 
> determine what addr has been assigned by SWBell to the LinkSys box.
> 
> Thanks,
> Michael
<snip>

Why not just have it send a blank message from cron and look at the 
header of the message to determine the source ip? If it's natted, the 
router will be the source ip.
-- 
Andrew Mathews
------------------------------------------------------------
   6:40pm  up 58 days, 18:18,  9 users,  load average: 1.03, 1.14, 1.11
------------------------------------------------------------
Humility is the first of the virtues -- for other people.
		-- Oliver Wendell Holmes




More information about the Linux-users mailing list