The wikis are now using the new authentication system.
If you did not migrate your account yet, visit

SDB:Find IP address

Jump to: navigation, search

This procedure was tested on openSUSE 12.1
The IP address is the way how computers are connecting on the Internet. Most of the time we don't need to know the IP address, as web browser is resolving that automatically from name like to IP address, but sometimes we want to know the IP of server that we are connecting to or the IP address you are accessing the Internet from.

Server IP address


The most common way to find the IP address for a given website/server is to use command

$ nslookup

The name comes from name server lookup.

For instance to find the IP address for a open a command line and type in:

$ nslookup

Your computer will contact the name server (DNS) that is assigned by your Internet service provider and print on the screen information, like this:


Non-authoritative answer:

In above example


is IP address of LAN router that is connecting to DNS server that is assigned by Internet service provider, but for computers in LAN that is the name server. If you connect directly to Internet the number can be different.


is almost the same, additional #53 is the port where DNS server is listening for incoming connections.

The next 3 lines are actual answer,

Non-authoritative answer:

Don't pay attention to

Non-authoritative answer:

as the only authoritative DNS server for is the one that serves domain, all others in the world can give you only non-authoritative answer, but as you can see Internet works fine anyway.


Another common method of finding the IP address of a server is the command:

$ host

Using the host to find the IP address of one would enter:

$ host

which would return the following (or similar): has address mail is handled by 0

Which gives the correct IP address:


dig DNS Information Gathering tool, gives a lot more output than host, which includes the IP address.

Which is used by entering the following command:

$ dig

Using as the example again, enter:

$ dig

Which returns:

; <<>> DiG 9.5.0-P2 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6100
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;                   IN      A

;; ANSWER SECTION:            1827    IN      A

;; Query time: 15 msec
;; WHEN: Wed Jan  6 23:15:07 2010
;; MSG SIZE  rcvd: 45

Most of this probably isn't interesting, what is interesting is the IP address given in the answer section:

;; ANSWER SECTION:            1827    IN      A

Again the IP address is given.

Your IP address

There are many websites which can tell you the IP address you are using to connect to the Internet, one such website is:

External links