LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-28-2006, 10:31 PM   #1
Hargibi
LQ Newbie
 
Registered: Apr 2005
Posts: 23

Rep: Reputation: 15
Changeing ip and i wanna keep track of it.


Ok so i got this linux server running slackware 10.2.
So sometimes after i reboot it, it changes IP adress and i have to go there and check what IP adress it has changed to so i can update my dns server and stuffs..
But is there a way to check that IP adress without going there? Like some program on my server that sends some ping or so to my machine so i can check what the ip has changed to?

Thanks
 
Old 06-28-2006, 10:56 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
If your network interface is eth0, the following returns the IP address. You can run it as a cron job and do something based on whether the output changes. I've used the full path to each executable because on my system cron runs with a different environment:
Code:
/sbin/ifconfig eth0 | /bin/grep 'inet addr' | /bin/awk  -F: {'print $2'} | /bin/cut -d' '  -f1
If you're using a dynamic DNS provider like dyndns.com, I'd recommend looking at one of the tools already out there to do this sort of thing. There are a couple at http://www.dyndns.com/support/clients/unix.html - I use ddclient and haven't had any problems with it.
 
Old 06-28-2006, 11:03 PM   #3
Hargibi
LQ Newbie
 
Registered: Apr 2005
Posts: 23

Original Poster
Rep: Reputation: 15
Im using http://www.mydomain.com/
And to tell the truth im not very good with linux machines..
So that code u typed there dident actually say me much.
So if u could be a bit more specific what it does id be very happy

Thanks.
 
Old 06-28-2006, 11:39 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
In that case, you only need to read my very first sentence. That code returns your IP address

Just to make sure we're talking about the same thing. The DNS you're talking about updating - is it a DNS server that you run, or is it the mydomain.com DNS server?
 
Old 06-29-2006, 12:17 AM   #5
Hargibi
LQ Newbie
 
Registered: Apr 2005
Posts: 23

Original Poster
Rep: Reputation: 15
mydomain is running my dns

*Edit*
If id copy that line of urs..
What do i do with it?
And where can i later check for the new IP adress?

Last edited by Hargibi; 06-29-2006 at 12:31 AM.
 
Old 06-29-2006, 02:38 AM   #6
Notwerk
Member
 
Registered: Apr 2005
Location: Jordan
Distribution: Debian (Sarge), Ubuntu (6.06)
Posts: 271

Rep: Reputation: 31
If mydomain.com is running the DNS you wish to update, I'd suggest looking for available client scripts that handle this issue and running it periodically (check out "cron").

The line Gilead provided retrieves the information about eth0 and *processes* it to remvoe everything except the device's current IP address.

A quick read of any introduction to linux shell commands should familiarize you with how to run commands in the shell, write scripts and all sorts of cool things you can do.

http://www.freeos.com/guides/lsst/

Google is your friend
 
  


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
changeing window mangers ?? Elspuddy Mandriva 3 09-22-2005 06:24 PM
Hint: Wanna try Linux, so wanna rig your Windows system to dual-boot? sundialsvcs Linux - Newbie 2 08-16-2005 02:56 PM
Changeing permissons jmanjeff Debian 3 04-01-2005 10:48 AM
Fonts changeing by themselves? BajaNick Linux - Software 0 12-20-2003 07:45 AM
changeing defults bricast Linux - Newbie 1 08-15-2002 10:30 AM

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

All times are GMT -5. The time now is 09:20 PM.

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