Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-01-2001, 05:56 AM
|
#1
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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
|
|
|
12-02-2001, 04:31 AM
|
#2
|
LQ Newbie
Registered: Nov 2001
Posts: 12
Rep:
|
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.
|
|
|
12-02-2001, 10:42 AM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
Original Poster
|
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.
|
|
|
12-02-2001, 08:35 PM
|
#4
|
Member
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52
Rep:
|
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.
|
|
|
12-02-2001, 10:47 PM
|
#5
|
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731
Rep:
|
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.
|
|
|
12-03-2001, 05:00 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
Original Poster
|
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 ;-)
|
|
|
12-03-2001, 05:48 AM
|
#7
|
LQ Newbie
Registered: Nov 2001
Posts: 12
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|