Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have two servers, 198.162.0.4 and 198.162.0.10, that were connected across a LAN. They are the components of a DMZ where 198.162.0.4 is the wen server and 198.162.0.10 the application server. 198.162.0.4 is running Ubuntu 11.04 while 198.162.0.10 is running Ubuntu 11.10. I had to restart 198.162.0.10 because Unity froze up. (I have since replaced it with Gnome.) Ever since I started it up again, I cannot get connectivity with 198.162.0.4. When I try

ping 192.162.0.4

I get

PING 192.162.0.4 (192.162.0.4) 56(84) bytes of data.

That is, it just hangs. I get the same result if I try

ping 192.162.0.10

on 192.162.0.4.

I had been saving my iptables in iptables.save but now I see that that fie is of zero size for some reason although I had a lot of rules in the IPtable. I tried to fix the problem with

sudo iptables -A OUTPUT -s 192.162.0.4 -j ACCEPT
sudo iptables -A OUTPUT -d 192.162.0.4 -j ACCEPT
sudo iptables -A INPUT -s 192.162.0.4 -j ACCEPT
sudo iptables -A INPUT -d 192.162.0.4 -j ACCEPT

but it has no effect. How do I fix it?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You are confusing your IP addresses. Your hosts are almost certainly 192.168.x.x, but you called them 198.162.x.x in your question, and then used 192.162.x.x in your ping command. Those are all different.

share|improve this answer
    
Thank you for that catch. That was the problem. Thanks very much. –  OtagoHarbour Sep 29 '12 at 12:59
add comment

This might be an issue where the 198.162.0.4 is not responding to arps correctly. One way to check this is to starting pinging 198.162.0.4 and then at the same to do an arp -an on the 198.162.0.10 and see if the other server is listed there properly.

Also, to check if it is a connectivity problem at all, try disabling your firewalls entirely until you can establish connectivity that way, at least then you can isolate the problem.

Finally, in this situation it is always good to run tcpdump in the background to save the packets. Remember to set the size to maximum to get the full packet! (tcpdump -i <interface> -s 65535 -w <some-file>). That should provide you with some clues as to what is going on.

share|improve this answer
    
Thank you for your help. My problem was a typo. My apologies. –  OtagoHarbour Sep 29 '12 at 13:00
add comment

Your Answer

 
discard

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.