Obtaining your external IP address using a Unix Utility


 
Thread Tools Search this Thread
Special Forums IP Networking Obtaining your external IP address using a Unix Utility
# 1  
Old 05-03-2009
Obtaining your external IP address using a Unix Utility

Hello, this is my first post on the Unix forums. This is something that's been bothering me for a while, is there any particular UNIX/Linux application that will allow you to see you external IP address? Smilie ( The address beyond your router )

Thank you in advance, I could not find a solution to this using google. Many of the solutions I found pointed me to websites that simply gave you your external ip, but i thought it would be nice to do this from within the comfort of the terminal.
# 2  
Old 05-03-2009
I am not sure if this is what you are looking for :

try from the command prompt

Code:
nslookup username


cheers,
Devaraj Takhellambam
# 3  
Old 05-03-2009
Thanks, using nslookup with my user name gives me my routers' IP address, and another IP address I'm not too familiar with, but it starts the same numbers in the first group, but the rest are different.

Do you know of any other utilities that would provide me with similar information?
# 4  
Old 05-03-2009
Sure, it is kind of a round about way but it will work. Try using lynx which is just a text based web browser and visit IP Chicken - Whats my IP address? ip address lookup
# 5  
Old 05-03-2009
Hey, thanks, I'll alias this now, and turn it into a useful function that just spits out that one line. Thanks!! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Grep a section from an UNIX file obtaining only part of the data

Hello, I have a log file that has several sections "BEGIN JOB, End of job" like in the following example: 19/06/12 - 16:00:57 (27787398-449294): BEGIN JOB j1(27787398-449294) JOB1 19/06/12 - 16:00:57 (27787398-449294): DIGIT: 0 number of present logs : 1 19/06/12 - 16:00:57... (4 Replies)
Discussion started by: mvalonso
4 Replies

2. IP Networking

Ping domain indicates the external ip address and not the local ip

when i execute from local machine ping domainname i get the external ip address but i am on local dns and i expect the local ip address.. using nslookup : no problem so i cannot find why... thanks (2 Replies)
Discussion started by: activedms
2 Replies

3. Shell Programming and Scripting

External IP Address of Linux Server

Hi, I am trying to find the external IP address of a server "XXX". I logged into server "XXX" and executed nslookup XXX. output number is 123.23.23.45 Later, i have executed "curl http://whatismyip.org". This time i got a different number 611.34.63.22 Out of these two numbers, what number... (1 Reply)
Discussion started by: forums123456
1 Replies

4. OS X (Apple)

mailx to external email address

Hi, How can I use "mailx" command to send message to an email address like this? echo "This email body" | mailx -s "my subject" "email@hostname.com" There may be some setup required in sendmail or postfix?? OS = Snow Leopard 10.6 (4 Replies)
Discussion started by: FlyingSquirrel
4 Replies

5. UNIX for Dummies Questions & Answers

How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b: I stopped at .. :( #!/bin/sh A=`hostname -i` echo "server ip address is $A"... (4 Replies)
Discussion started by: zagaruika
4 Replies

6. OS X (Apple)

Getting the External IP Address of your Computer and Storing it in a File

My computer is one of three computer on our LAN. Our router is a Time Capsule. My computer is the only of of three computers that has been assigned a static IP address on the LAN, because it runs an Apache installation. I tinker around with web development from time to time, and I wanted to be... (7 Replies)
Discussion started by: Audacitor
7 Replies

7. IP Networking

Obtaining IP address from both my network interface

HI folks, I am developing a software which one of the module is to interchange the ip address of another active network interface's when making a socket connection. I would like to know whether there is any function call that would enable me to retrieve the ip address that is obtained by a... (2 Replies)
Discussion started by: citiz3n
2 Replies

8. HP-UX

Connecting To An External Network Using A logical (PACKAGE) IP Address

Hie everyone, I am currently facing a problem whereby I can not connect to an external network from a package ip address on a HP-UX cluster. Below is the illustration: Primary Server IP Address : n.n.n.202 Secondary Server IP Address : n.n.n.212 Package IP Address : n.n.n.211 ... (1 Reply)
Discussion started by: cchilenga
1 Replies

9. SCO

Looking for guidance in obtaining a job in Unix Administration

I recently took a training through a college, and have obtained the CUSA certification, but I've been looking and don't see any jobs in unix out there! Does anyone know of hidden job markets in the unix administration area, located in the Detroit - Michigan area? (4 Replies)
Discussion started by: pkali290
4 Replies

10. IP Networking

Obtaining IP address

How can UNIX systems obtain IP addresses? Can it obtain from Win 2000 Server, DHCP service, dynamically? (1 Reply)
Discussion started by: Raael
1 Replies
Login or Register to Ask a Question