[Ilugc] net.ipv4.ip_forward

  • From: mohan.tux@xxxxxxxxx (Mohan Sundaram)
  • Date: Tue Sep 1 08:59:15 2009

On Mon, Aug 31, 2009 at 8:19 PM, Girish
Venkatachalam<girishvenkatachalam@xxxxxxxxx> wrote:

On Mon, Aug 31, 2009 at 3:35 PM, Ashish Verma<ashishverma1984@xxxxxxxxx> 
wrote:

Now to answer your question after all this digression, you don't need
this sysctl for forwarding/routing for ping to work.

Not unless you have a proxy running for ping on the machine common to
the two networks.

You are barking up the wrong tree.

How is that? Is ICMP a non-IP packet for it to be routed even if
ip_forward is 0?

Normally it is very rare that you set this sysctl. You do it if you are a
?firewall or a proxy or if you are running squid.

Let us address this specific question. I read what you are saying as -
A can ping C via B using static routes on A and ip_forward to 0 in B?

A-----------------------------B---------------------C

That is wrong. When a packet arrives to a box, if the destination is
not local, the packet should be forwarded. This forwarding will happen
only if the ip_forward flag is set to 1.

OP has also remained silent so far on whether his question was answered.

Mohan Sundaram

Other related posts: