The UNIX Forums  



Go Back   The UNIX Forums > Top Forums > UNIX for Dummies Questions & Answers
Home Forums Register Rules & FAQDonate Members List Search Today's Posts Mark Forums Read

UNIX for Dummies Questions & Answers If you're not sure where to post a technical question, post it here. All UNIX and Linux Newbies Welcome !!

Reply
 
Submit Tools Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-24-2007
Registered User
 
Join Date: Jun 2007
Posts: 14
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
How to view my IP

I run Ubuntu server 7.04, to learn some *nix. I set up LAMP, DNS and FTP but I don't know how to view my ip. now I tried ifconfig but that didnt tell me what I wanted to know.

so by what way can I do this without a gui and a website like ipchicken?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-24-2007
Moderator
 
Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,334
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
What did ifconfig tell you? Can you please quote the output?
Reply With Quote
Forum Sponsor
  #3 (permalink)  
Old 06-24-2007
Registered User
 
Join Date: Jun 2007
Posts: 14
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
eth0

Link encap:ethern3t
inet addr:192.168.2.2 Bcast: 192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::201:2ff:fe03:405/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric:1
...

Hop this is enough.
I have it connected and sharing internet with my mac if that helps
Reply With Quote
  #4 (permalink)  
Old 06-24-2007
Moderator
 
Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,334
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Isn't this the IP?

Quote:
Originally Posted by blowFish@ubuntu View Post
eth0
inet addr:192.168.2.2 Bcast: 192.168.2.255 Mask:255.255.255.0
Reply With Quote
  #5 (permalink)  
Old 06-24-2007
Registered User
 
Join Date: Jun 2007
Posts: 14
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
oops... Thats there because of my router... Haven't gone into net+ study yet so I don't understand how the router manages the IP from my ISP.

Im guessing that the router changes the IP somehow for each computer on the network?
Reply With Quote
  #6 (permalink)  
Old 06-24-2007
Registered User
 
Join Date: Jan 2007
Posts: 2,965
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by blowFish@ubuntu View Post
oops... Thats there because of my router... Haven't gone into net+ study yet so I don't understand how the router manages the IP from my ISP.

Im guessing that the router changes the IP somehow for each computer on the network?
I suggest you read up on

DHCP - this is typically how an ADSL router will allocate addresses

NAT - how the router will change addresses between local and internet domains

DNS - how name mapping works, and that the ADSL router may act as a DNS proxy

Last edited by porter : 06-25-2007 at 12:32 PM.
Reply With Quote
  #7 (permalink)  
Old 06-25-2007
Moderator
 
Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,334
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
ifconfig shows the actual IP assigned to your interface. So if your router performs NAT, it is natural that you see private IPs on your system. As for the IP address at the router, normally a host in the network will not know about that address at all, because it will be replaced as part of NAT at the router.
Reply With Quote
  #8 (permalink)  
Old 06-25-2007
Registered User
 
Join Date: May 2007
Posts: 104
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
You'd need to log onto your router to find the IP address on the WAN interface (the outside of your router pointed towards the interweb...)
Reply With Quote
  #9 (permalink)  
Old 06-25-2007
Registered User
 
Join Date: Jun 2007
Posts: 14
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Ok so I guess Ill be digging into my router again :/
Reply With Quote
  #10 (permalink)  
Old 06-25-2007
Neo's Avatar
Neo Neo is online now
Administrator
 
Join Date: Sep 2000
Location: Asia Pacific
Posts: 3,616
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
You can do a traceroute to an address in the Internet (from your server) and get WAN info.
Reply With Quote
  #11 (permalink)  
Old 06-26-2007
zazzybob's Avatar
Registered Geek
 
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Code:
$ telnet sendmail.org 25
Trying 209.246.26.22...
Connected to sendmail.org.
Escape character is '^]'.
220 services.sendmail.org ESMTP Sendmail 8.14.0.Alpha1/8.14.0.Alpha1; Mon, 25 Jun 2007 22:09:42 -0700 (PDT)
HELO localhost
250 services.sendmail.org Hello foo.bar.com [199.199.199.199], pleased to meet you
QUIT
221 2.0.0 services.sendmail.org closing connection
Connection closed by foreign host.
Cheers
ZB
Reply With Quote
  #12 (permalink)  
Old 06-26-2007
Registered User
 
Join Date: Jun 2007
Posts: 14
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
alright I tried the traceroute and (not sure if its suppose to) it showed my private network ip...

I trying the telnet hoojiger now and its taking a long time..

Its getting late so I'll pick this up tomorrow evening.
[edit] the telnet timed out
Reply With Quote
  #13 (permalink)  
Old 06-26-2007
zazzybob's Avatar
Registered Geek
 
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Code:
$ curl http://www.zazzybob.com/my_ip/get_my_ip.php 2>/dev/null | sed -n 's/^.*<!--IP-->\([^<]*\)<!--IP-->.*$/\1/p'
Cheers
ZB
Reply With Quote
  #14 (permalink)  
Old 2 Weeks Ago
Registered User
 
Join Date: Apr 2008
Posts: 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Try these two scripts: they just do what they already suggested you, but it can be useful to keep them in your /bin directory :-)

Saverio Bolognani's Home Page - What is my IP?

Ciao,
Saverio
Reply With Quote
  #15 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: Oct 2006
Location: ROK
Posts: 16
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by blowFish@ubuntu View Post
I run Ubuntu server 7.04, to learn some *nix. I set up LAMP, DNS and FTP but I don't know how to view my ip. now I tried ifconfig but that didnt tell me what I wanted to know.

so by what way can I do this without a gui and a website like ipchicken?
Check your IP
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
view log files sak900354 UNIX for Dummies Questions & Answers 5 06-15-2006 06:26 AM
cmd to view only directories aarora_98 Shell Programming and Scripting 14 05-08-2006 01:51 PM
view all others terminals vkandati UNIX for Dummies Questions & Answers 2 03-08-2005 05:27 PM
DBM View schafferm UNIX for Dummies Questions & Answers 1 08-06-2002 03:18 AM


web tracker

All times are GMT -5. The time now is 11:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93