LinuxQuestions.org
Visit Jeremy's Blog.
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 07-22-2009, 08:30 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Rep: Reputation: 51
Query related to Ubuntu WAN Ip?


I have a PC with Ubuntu on it.
My pc is connected to Internet like this:
Internet <-----> ADSL Modem <-----> PC(Ubuntu)

On ubuntu Machine I can only see eth0/eth1 oscillating one after another keeping changing from eth0 to eth1 and then eth1 to eth0.
(Donno the reason).
But My Question is when I run
#ifconfig
It just show me 192.168.1.1.
I have wired Broadband connection.
Why it dont display me WAN IP or Public IP.
Can anyone explain me that?
 
Old 07-22-2009, 09:12 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Hello your_shadow03
Quote:
Originally Posted by your_shadow03 View Post
On ubuntu Machine I can only see eth0/eth1 oscillating one after another keeping changing from eth0 to eth1 and then eth1 to eth0.
What do you do to see this?
Quote:
Originally Posted by your_shadow03 View Post
But My Question is when I run
#ifconfig
It just show me 192.168.1.1.
I have wired Broadband connection.
Why it dont display me WAN IP or Public IP.
Can anyone explain me that?
ifconfig tells you about the ports on the local machine which doesn't know about the IP address on the Internet side of your ADSL modem.

Most ADSL modems provide a browseable page where you can log on and see various things including your address on the Internet.

You can find your Internet address from several websites including http://checkip.dyndns.org/

Best

Charles
 
Old 07-22-2009, 09:42 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,628

Rep: Reputation: Disabled
Exactly unless you have the port attached to your Ubuntu machine ifconfig command will not show your live ip there. It is assigned to the adsl modem port.
 
Old 07-22-2009, 01:29 PM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I tried running:
http://checkip.dyndns.org/

Current IP Address: 118.192.232.169

Yes..It seems the WAN IP.
I tried pinging the same from my office PC.
IF I tried creating a webpage under http://localhost/index.php on my home laptop with Ubuntu on it will it open at my office computer through http://118.192.232.169/index.php?

Last edited by your_shadow03; 07-22-2009 at 02:02 PM.
 
Old 07-22-2009, 01:50 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Quote:
Originally Posted by your_shadow03 View Post
I tried running:
http://checkip.dyndns.org/

Current IP Address: 118.192.232.169

It showed the above Output.
Is it WAN IP?
I have always believed so. Do you have reason to doubt?
 
Old 07-23-2009, 08:03 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,628

Rep: Reputation: Disabled
Quote:
Originally Posted by your_shadow03 View Post
I tried running:
http://checkip.dyndns.org/

Current IP Address: 118.192.232.169

Yes..It seems the WAN IP.
I tried pinging the same from my office PC.
IF I tried creating a webpage under http://localhost/index.php on my home laptop with Ubuntu on it will it open at my office computer through http://118.192.232.169/index.php?
Well you will need to redirect to your local machine this request as this ip is wan live ip and it is not assigned to your ubuntu machine. it is assigned to your adsl. you will need to redirect the request.
 
Old 07-23-2009, 08:20 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
What should be edited? Which File?
Code:
it is assigned to your adsl. you will need to redirect the request.
What should I do?
 
Old 07-23-2009, 08:48 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Hello your_shadow03
Quote:
Originally Posted by your_shadow03 View Post
What should be edited? Which File?
Code:
it is assigned to your adsl. you will need to redirect the request.
What should I do?
You have two choices if you want a webserver on your LAN to be accessible from the Internet (as opposed to your webserver initiating the connection): "bridging mode" and "port forwarding". Both require configuring your ADSL modem.

Port forwarding is more secure and easier. You will need to read your ADSL modem documentation and to know which ports are used by incoming connections from the Internet to your webserver. Here's a list of TCP and UDP ports. HTTP uses 80 and HTTPS uses 443. That might be enough ???

You probably don't not have the same IP address on the Internet all the time.

Best

Charles
 
  


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
Query related to syslog? your_shadow03 Linux - Newbie 5 05-15-2009 11:32 AM
A Query related to Git? your_shadow03 Linux - Newbie 10 04-24-2009 12:35 AM
Query related to sudo? your_shadow03 Linux - Newbie 2 04-22-2009 01:21 AM
shell related query !!!!!!!!!!! iacharyya Linux - General 10 06-09-2008 07:39 PM
kernel related query abhidude Linux - General 2 11-29-2004 10:09 AM


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