LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2003, 01:49 PM   #1
Jakkyl
LQ Newbie
 
Registered: Oct 2003
Location: Raleigh, NC
Distribution: Slackware 10.2
Posts: 21

Rep: Reputation: 15
External IP


How do I find out my external IP? I've got a dynamic ip address and dont know what it is...
I used ifconfig and it says my inet addr is 192.168.1.96 for eth0. I was searching the forum and found that that's an internal ip only? I ha da friend try and ping it and he just timed out, so I gues that's true. How do I get my real IP?? Thanks for any help.

Using Slackware 9.1

**Joshua
 
Old 10-16-2003, 01:58 PM   #2
fragglehorn
Member
 
Registered: Oct 2002
Location: I-Town, NY
Distribution: Debian, Slackware
Posts: 130

Rep: Reputation: 15
Try this site:

http://www.whatismyip.com
 
Old 10-16-2003, 02:03 PM   #3
Jakkyl
LQ Newbie
 
Registered: Oct 2003
Location: Raleigh, NC
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks, that was easy enough... is there anyway to find it out from the commandline?
 
Old 10-16-2003, 02:15 PM   #4
fragglehorn
Member
 
Registered: Oct 2002
Location: I-Town, NY
Distribution: Debian, Slackware
Posts: 130

Rep: Reputation: 15
You'd think there would be, and there probably is. You could always use a text-based web browser.

$ lynx http://www.whatismyip.com
 
Old 10-16-2003, 02:22 PM   #5
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
Quote:
Originally posted by Jakkyl
Thanks, that was easy enough... is there anyway to find it out from the commandline?
Well the problem is that the computer you are using really does NOT know its "Real IP" See, the 192.* address IS the IP it has and the only one it knows....the way it works, is that it also knows that there's a gateway somewhere (whether its a router you bought or a machine you set up) and when it sends a packet to say...225.154.whatever whatever, it sends the packet to the gateway...and the gateway sends it out itself with the "real IP" as the return address...then when it gets the reply, it knows to pass it along to YOUR machine (ie: the one at 192.*)

See, the real IP is the address of your gateway or router or whatever you wish to call it...

Now for my system, I have a linux machine acting as a router/gateway, so when I need to know my IP (ie: the real one assigned from my ISP and not the one given to my internal machines), I just SSH over to it and do an ifconfig eth0.
 
Old 10-16-2003, 02:24 PM   #6
Jakkyl
LQ Newbie
 
Registered: Oct 2003
Location: Raleigh, NC
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
The thing of it is, I'm trying to get Apache set up so I can run a web server from my comp. when I got to localhost it pulls up the page, but when I type in this new ip, i get a message box that says 'connection refused when connectiing to...' And ive got no clue...
 
Old 10-16-2003, 02:43 PM   #7
vegeta_nc
LQ Newbie
 
Registered: Oct 2003
Location: Spring Tx.
Distribution: Mandrake and Slackware
Posts: 16

Rep: Reputation: 0
What ever your gateway is, you can forward the port. What is your gateway, a hardware router (like a linksys router), or a linux box setup to share your inet connection?
 
Old 10-16-2003, 02:44 PM   #8
krazyglue
Member
 
Registered: Oct 2003
Posts: 68

Rep: Reputation: 16
Are you running this behind a cable/DSL modem router? If so, you need to setup port forwarding on your router (port 80 for http) and have it forward requests to the internal IP address. Sounds to me like you get it setup correctly (if you can do the localhost name and get a page). Can you use the internal IP and still get a page to display? If so, I would say you have everything correct (in your setup) and need to check on the port forwarding.
 
Old 10-16-2003, 06:25 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,928

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Whats your network configuration? How do you connect to the internet: Broadband, dialup etc?
 
Old 10-16-2003, 09:48 PM   #10
Jakkyl
LQ Newbie
 
Registered: Oct 2003
Location: Raleigh, NC
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
I connect through a DSL modem. Yea, when i type in my internal IP, the page shows up. So, how do I setup my port forwarding?

I've got the port set to 80 in my httpd.conf for apache. I don't know if thats it. I also had a friend ping my external address, and he got a response...
 
Old 10-17-2003, 12:54 AM   #11
krazyglue
Member
 
Registered: Oct 2003
Posts: 68

Rep: Reputation: 16
are you directly connecting from the modem to the PC? Or are you using a router between the modem and PC?

if your using a router (which i figure you are b/c your getting an internal IP), you need to configure the router to forward your ports. You can do this by connecting to the router (generally the IP of the router it 192.168.1.1) via your web browser. With my linksys router, I go to "advanced" tab. then to the "forwarding" tab. Then, forward the external port 80 to you internal IP of your webserver (which should be something like 192.168.1.x).

if you not using a router and you are directly connecting your DSL modem and PC then you might have some problems. I was using Verizon DSL and some how they disabled incoming requests. I never got it working.

I hope this helps if not post again what kind of router you are using, or if your using one at all.
 
Old 10-17-2003, 12:55 AM   #12
rakriege
Member
 
Registered: Oct 2003
Location: San Deigo, CA
Distribution: FC3, Win2k Server, XP Pro & 2003 Server
Posts: 198

Rep: Reputation: 30
ipconfig /all|more


sorry, thats windows

 
Old 10-17-2003, 06:18 AM   #13
Jakkyl
LQ Newbie
 
Registered: Oct 2003
Location: Raleigh, NC
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
I'm connecting straight to the modem...
 
Old 10-18-2003, 09:43 AM   #14
Jakkyl
LQ Newbie
 
Registered: Oct 2003
Location: Raleigh, NC
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
Ok, I gave my ISP a ring and they told me how to setup forwarding. I did it. But I'm still not getting anything... I type in my external IP and get connection refused... Ideas?

Last edited by Jakkyl; 10-18-2003 at 09:45 AM.
 
Old 10-18-2003, 01:02 PM   #15
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
Quote:
Originally posted by Jakkyl
Thanks, that was easy enough... is there anyway to find it out from the commandline?
Code:
lynx -dump www.whatismyip.org
the .org site only returns a single line with the IP address.
 
  


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 IP robinhood1995 Linux - Networking 7 01-20-2002 01:19 PM


All times are GMT -5. The time now is 04:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration