Enabling IP forwarding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I have a linux 2.4.7 box named X with two network interfaces, attaching
itself to two different subnets, 1 and 2.

I want to do ip forwarding, when a machine M1 in subnet 1 tries to reach a
machine M2 in subnet 2. So I add a necessary route in M1 to make sure that
it uses X as the gateway for the destination network 2.

Trial 1
Manually edit the /proc/sys/net/ipv4/ip_forward file in X to change 0 to 1.
Now a traceroute from M1 to M2 shows that X acts as the gateway.

Trial 2
Keep /proc/sys/net/ipv4/ip_forward unchanged (ie. Keep it as 0). Add the
line FORWARD_IPV4=true in /etc/sysconfig/network file of X , and then do a
"service network restart".

Now traceroute from M1 to M2 does not work. I tried even rebooting X, but
that also didnt help. But again changing ip_forward file (as in Trial 
1)  worked.

Could someone please explain what was worng with my approach in trial 2.
Thanks in advance
Regards,
Rajesh N

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux