[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Get the external IP address from a Linux box

On 24/05/18 18:59, Joe wrote:

> To begin with, try:
> ip addr show
> and look for the block of information with a label beginning 'eth' or
> 'en'. That will contain the Ethernet adaptor IP address. From your
> question, I assume your computer contains only one.
> The address returned by Internet sites will be your public IP address,
> and unless you have a very unusual setup, that will not be the same as
> the IP address of your computer. But you have told us nothing at all
> about how your computer connects to the Internet, so I am just guessing.
> On the assumption that you are using a router of some kind, your public
> IP address will be that of the router WAN port (cable, ADSL, etc.) and
> there will be a method of determining that by connecting to the router
> as an administrator. That method will depend entirely on the router.

Until recently, I would have agreed with you - and when I tried the
nifty google dns lookup mentioned in another post, that's what I was

Now, however, I get an IPv6 address, and it is the one on my desktop PC.
I can get the router's external IPv4 address by using dig -4.

I suspect my experience is becoming less unusual these days.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: