Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-11-2009, 07:42 AM   #1
LQ Newbie
Registered: May 2009
Posts: 4

Rep: Reputation: 0
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
and the connectivity between Host B and Router 1 is of network

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 Gateway is
The ip address of Host B is Gateway is

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

I am really confused.Is anything apart from this must be configured.
An quicker help is needed. Kindly help.
Old 05-11-2009, 10:15 AM   #2
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Lenny
Posts: 351

Rep: Reputation: 47
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.

ipv4_Forward =1 (is not a valid command in sysctl.conf)
it must be
net.ipv4.ip_forward = 1
Old 05-11-2009, 10:22 AM   #3
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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.
Old 05-11-2009, 05:50 PM   #4
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
Hi and welcome to LQ.
Originally Posted by learnlinux2day View Post
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!
Old 05-11-2009, 11:40 PM   #5
LQ Newbie
Registered: May 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can ping network computer, cannot ping (help needed) ben_build#2.1.0 Linux - Wireless Networking 23 11-07-2010 12:55 PM
Problem with iptables firewall - can't ping machines on internal network ukstu Linux - Networking 2 11-26-2007 06:36 AM
Network problem : Server won't respond to ping bogzab Slackware 4 02-15-2007 03:52 PM
Can ping network but can't ping any internet ip when I hard set the ip Streme Linux - Wireless Networking 4 04-13-2004 09:18 AM
Strange ping/network problem Noerr Linux - Networking 8 05-29-2002 12:01 PM

All times are GMT -5. The time now is 05:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration