Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a LAN each computer is assigned a different IP address each morning. When I installed Kubuntu 12.10 the IP address assigned to the machine was, but today it is When I try to connect to in Firefox I see in the status bar Connecting to However, there is no mention of that address in the /etc/hosts file:       localhost       bruno

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Note that setting the DHCP server to assign the same IP address per MAC address cannot be done as the router is unplugged each evening (electrical issues in the building) and loses the settings.

share|improve this question
Which web browser are you using? Please add that information to your question. – jdthood Jan 9 '13 at 10:38
@jdthood: Thanks, I added that the web browser is Firefox. – dotancohen Jan 9 '13 at 10:40
I don't know why Firefox is trying to connect to 10.* when you type in But you may be able to work around the problem of it connecting to the wrong IP address by making Firefox clear its cache. – jdthood Jan 9 '13 at 10:47
Thanks, jdhood. I've forced the IP address back to so that I could work so I cannot test now, but I think that you're right. Please post your comment an answer so that I could accept it. I will test this later when less fires are burning. – dotancohen Jan 9 '13 at 10:58
Well, we're not sure that the solution works yet. Report back here and I'll craft a suitable answer. :) Also, the more interesting question is, indeed, why trying to connect to results in "connecting to 10.0...". – jdthood Jan 9 '13 at 11:01
up vote 2 down vote accepted

The previous IP address was and now it is If Firefox is now trying to connect to then it must have previously cached that address. Clear Firefox's cache; whatever mechanism previously redirected Firefox from to should now redirect Firefox to

share|improve this answer

If gets redirected to then it means that the web server listening on is doing such redirect.

So the fault is not of the TCP stack implementation of Linux, nor is there anything wrong with /etc/hosts. (Do not confuse host names with IP addresses: host names are resolved, IP addresses are not. In other words, there is no way to make "resolve" to without using a high-level protocol such as HTTP, which allows redirection from one IP address to another.)

Try using wget which will give you many useful details. You should see something like the following.

$ wget
--2013-01-09 15:55:38--
Connecting to connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: [following]

Of course, the exact output will vary depending on the situation. However, if you see a similar output, it is evidence that a web server is doing the redirect.

Therefore, to solve the problem, you should look into your web server configuration.

share|improve this answer
Thank you, I see via wget that there is no redirect. However, recursively grepping /etc/apache2/ for the string produces no results, either. – dotancohen Jan 9 '13 at 16:40
Does wget work correctly (i.e. which IP address does it use)? The reason I'm asking is this: if wget works correctly, then the problem may be in your web browser (and if this is the case, clearing the cache should help). Please, would you kindly paste the output of wget in your question and also specify which browser are you using? Thanks! – Andrea Corbellini Jan 9 '13 at 16:46
Oops, sorry. I just noticed that the web browser is already specified in your question. – Andrea Corbellini Jan 9 '13 at 16:47
I do agree that the web browser is the issue. I've worked around the issue to get some work done today, but I'm pretty sure that jdthood's comment regarding the browser cache may be right. He won't post it as an answer for me to accept until I test it, though, and I don't know when I'll have opportune to mess up this LAN on purpose! – dotancohen Jan 9 '13 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.