LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ping Problem Across the Network (https://www.linuxquestions.org/questions/linux-newbie-8/ping-problem-across-the-network-725178/)

learnlinux2day 05-11-2009 07:42 AM

Ping Problem Across the Network
 
Hi Everyone,
I am Newbie to linux.
I have a problem related to pinging the systems across the network established in the form shown below.

Host A<--------->Router 1<-------->Host B

The connectivity between Host A and Router1 is of Network 192.168.1.0
and the connectivity between Host B and Router 1 is of network 192.168.2.0

The components Host A, Router1 and Host B are all Linux installed PC's of distribution Fedora 7.

I want Router1 to act as router so i have enabled the ipv4_Forward =1 in /etc/sysctl.conf file.

When i ping for the connectivity in the connections from router i am able to ping as it is directly connected.

But when i ping from Host A to Host B via Router 1 it is not pinging im getting the ICMP error as Destination Host Prohibited.The same holds when the ping is issued from Host B to Host A also.

The ip address of Host A is 192.168.1.10/24 Gateway is 192.168.1.11
The ip address of Host B is 192.168.2.11/24 Gateway is 192.168.2.12

The ip address of Router 1 at network 1 side is 192.168.1.11
The ip address of Router 1 at network 2 side is 192.168.2.12

I am really confused.Is anything apart from this must be configured.
An quicker help is needed. Kindly help.

bhaslinux 05-11-2009 10:15 AM

It must work.
The best place to trouble-shoot is to sit in the router machine
and using tcpdump find out where the ping packets are going and how
it is getting dropped.

BTW
ipv4_Forward =1 (is not a valid command in sysctl.conf)
it must be
net.ipv4.ip_forward = 1

repo 05-11-2009 10:22 AM

Quote:

But when i ping from Host A to Host B via Router 1 it is not pinging im getting the ICMP error as Destination Host Prohibited
Destination Host Prohibited means ICMP is blocked, by router or destination.
Take a look at the firewall settings.

Thymox 05-11-2009 05:50 PM

Hi and welcome to LQ.
Quote:

Originally Posted by learnlinux2day (Post 3536982)
i have enabled the ipv4_Forward =1 in /etc/sysctl.conf file

Enabling routing is not normally enough - you also need to give some rules as to what gets forwards from where to where. Check your IPTables. There are lots of good tutorials on setting up routing with IPTables on the Internet - have a Google!

learnlinux2day 05-11-2009 11:40 PM

Hi ALL
Thanks for your replies.
It worked finally, the problem was in the router pc iptables.
The iptables were flushed completely and new rules were set.

iptables -A INPUT -j ACCEPT
iptables -A FORWARD -j ACCEPT
iptables -A OUTPUT -j ACCEPT

Then Bingo pings worked all over.
Thank u all for the responses.


All times are GMT -5. The time now is 02:54 AM.