LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2001, 05:56 AM   #1
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ip in text file?


hi hi, anyone know if the ip address of a dhcp interface is stored in plain text anywhere? is there any other way to find my gateway's external ip from an internal box? i've an nfs share of the gateways whole fs, so it has to be there somewhere... just not found it yet.

ta
 
Old 12-02-2001, 04:31 AM   #2
hurtsman
LQ Newbie
 
Registered: Nov 2001
Posts: 12

Rep: Reputation: 0
Red face

No.1 you can ssh or telnet external host, then run command "w", where you will find out your external ip.
No. 2 you ssh or telnet firewall box, then run command "ifconfig", then see.
 
Old 12-02-2001, 10:42 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Original Poster
Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
erm.. well yeah.. that's obvious, i want a way to specifally avoid logging in and such like. so i want it in a text file so i can access it internally. it's listed as hex in /proc/net/route, but i don't want to struggle to convert it to decimal in a script or a c program.

and w is to show what users are logged in, it doesn't dislpay the ip's.

Last edited by acid_kewpie; 12-02-2001 at 10:52 AM.
 
Old 12-02-2001, 08:35 PM   #4
dangel
Member
 
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52

Rep: Reputation: 15
why not just create a script that parses the information out and dump it to a file? put it in a cron job maybe?

i'm not exactly sure what your trying to accomplish - end result i mean, but seems the easiest solution.
 
Old 12-02-2001, 10:47 PM   #5
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
dhcpcd dumps my lease info to /var/state/dhcp/dhcp-et0.info

A quick trip to gibby's portscanner (www.grc.com) will show you your external IP before you start the scan.
 
Old 12-03-2001, 05:00 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Original Poster
Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ahh perfect mcleodnine.

Don't suppose you've ever seen 'Centurions'? whenever you post i think of Jake McCloud from there, with his strap-on jet-plane thing.

ahh forget it ;-)
 
Old 12-03-2001, 05:48 AM   #7
hurtsman
LQ Newbie
 
Registered: Nov 2001
Posts: 12

Rep: Reputation: 0
Red face

hi,
what you say is right. But i mean that when you login box out of firewall box, then use command "w". Donot forget that "w" can show where you are from.
i test other way to get external ip of firewall. that is to use sniffer tool. you run "sniffer -i ",then show how your LAN connect .

hi, what you say dhcp is dhcpd or dhcpcd, one server and one client. if server, you read "/etc/dhcpd.conf " and "/var/lib/dhcpd/dhcpd.lease" . if client,you read "/etc/dhcpcd/dhcpcd-eth0.info".

hurtsman
Dec 3,2001
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 11:28 AM
storing text in a text file for a specified length of time. mrobertson Programming 7 08-02-2005 10:27 AM
How to find and change a specific text in a text file by using shell script Bassam Programming 1 07-18-2005 07:15 PM
Replace text of unknown content with other text in file brian0918 Programming 15 07-14-2005 09:22 PM
Replace text of unknown content with other text in file brian0918 Linux - Software 1 07-14-2005 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration