LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-11-2009, 07:42 AM   #1
learnlinux2day
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 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.
 
Old 05-11-2009, 10:15 AM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Bullseye
Posts: 357

Rep: Reputation: 49
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
 
Old 05-11-2009, 10:22 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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

Rep: Reputation: 64
Hi and welcome to LQ.
Quote:
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
learnlinux2day
LQ Newbie
 
Registered: May 2009
Posts: 4

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


Reply



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 google.com (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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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