Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I have 2 computers with Linux running on them:

  • ip: hostname: COMPUTER1
  • ip: hostname: COMPUTER2
  • ip: the router

I configured the /etc/hostname files with the corresponding hostname on both computers.
I also configured the /etc/hosts files:   localhost.localdomain   localhost COMPUTER1  
::1         localhost.localdomain   localhost COMPUTER1

And I did the same thing with COMPUTER2 for the second computer.
The IP adresses are provided from the router via DHCP. On both computers the DNS server is the router: /etc/resolv.conf


I can ping from COMPUTER1 and COMPUTER2.
I can ping COMPUTER1 from itself but I can't ping COMPUTER1 from COMPUTER2.

Does anyone know how to solve it?

share|improve this question
did you add the names COMPUTER1 and COMPUTER2 to the other host's host file or the routers DNS zone? it looks like as it stands now, only the localhost can resolve COMPUTER1 or COMPUTER2. – Frank Thomas Jun 20 '13 at 15:58
I added them to the /etc/hostname and /etc/hosts files on both computers. And I don't know what the routers DNS zone is. – Nicolas Jun 20 '13 at 16:00
may be being pedantic, but to clarify, the host file on COMPUTER1 has a line for COMPUTER2 with the IP ? – Frank Thomas Jun 20 '13 at 16:01
If you setup the IP and Default gateway properly, then it should work. Can you see if you have iptables on both machines are running or not? – user2480011 Jun 20 '13 at 16:01
whats your router model? if possible, adding the hosts to its zone is the best possible solution. – Frank Thomas Jun 20 '13 at 16:06

Your Answer


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

Browse other questions tagged or ask your own question.