LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-20-2002, 02:13 AM   #1
robinhood1995
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: CentOS 5.2
Posts: 52

Rep: Reputation: 15
external IP


I was wondering if it possible since I have a DSL/external ip to 'cat' it out to a ( file ) so I can email or ftp myself when the ips decides to change it on me?
 
Old 01-20-2002, 05:19 AM   #2
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
cat /simon/etc/dhcpcd/dhcpcd-eth1.info | grep IPADDR | cut -b8- > /tmp/ipaddress

well, that'll put the ip into a file (is dsl is on eth1) and you're using dhcpcd. you'd probably want to put a check in it to compare it to the last versino and run it in a cron job. or maybe check the edit date on the file to see if it changed recently.
 
Old 01-20-2002, 11:31 AM   #3
robinhood1995
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: CentOS 5.2
Posts: 52

Original Poster
Rep: Reputation: 15
I this the above and it worked, only one thing it gave me the 192.168.1.??? address I have from my linksys router. Anymore ideas would be great.....

Steve
 
Old 01-20-2002, 11:36 AM   #4
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
well, change the interface number to eth0 then i guess.
 
Old 01-20-2002, 12:22 PM   #5
robinhood1995
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: CentOS 5.2
Posts: 52

Original Poster
Rep: Reputation: 15
I used the eth0 and the response that I got. I didn'y have the eth1 option.
 
Old 01-20-2002, 12:28 PM   #6
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
well, what interface does have your external address on it? is it not connected to your system? to be honest, i really don't knw what a hardware router completely is, or how you use it, but you must have your external ip listed somewhere... erm... i think... i suppose that yuor gateway would actaully be set to the router's ip, not the dsl connection... i'm a bit lost now!
 
Old 01-20-2002, 01:12 PM   #7
robinhood1995
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: CentOS 5.2
Posts: 52

Original Poster
Rep: Reputation: 15
Yeah, DSL pipcell is connected to the linksys dhcp/router which gives the /etc/dhcpcd/dhcpcd-eth0.info the following:

IPADDR=192.168.1.103
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
GATEWAY=192.168.1.1

the only way I get my external ip so far is to hit a website that displays your external ip.
 
Old 01-20-2002, 01:19 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by bluecadet
well, what interface does have your external address on it? is it not connected to your system? to be honest, i really don't knw what a hardware router completely is, or how you use it, but you must have your external ip listed somewhere... erm... i think... i suppose that yuor gateway would actaully be set to the router's ip, not the dsl connection... i'm a bit lost now!
basically he would have to pull the or get the ip info from his cable/dsl router, which is setup as default router 192.168.1.1 and only gives ip's either static or dhcp in the 192.168.1.X range for the internal network sharing the connection. I don't know of anyway to get the current ip info unless you pull up the configuration page on your internal network for the router.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
External ip Fuwex Linux - Networking 0 12-07-2004 09:03 AM
External IP zaicheke Linux - Networking 3 10-28-2004 05:32 PM
External TV csosa Linux - Software 1 09-27-2003 10:30 PM
External HD AlexXx Linux - Hardware 2 03-16-2003 03:39 AM
External CD-RW Coproscefalo Linux - General 2 11-06-2001 11:26 AM

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

All times are GMT -5. The time now is 09:26 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