Re: setting up "ip_forwarding" on Linux box

From: David (thunderbolt01@netscape.net)
Date: 05/10/02


From: David <thunderbolt01@netscape.net>
Date: Fri, 10 May 2002 19:06:36 GMT

S C wrote:
>
> I Enabled IP forwarding by setting it to "yes" in /etc/sysconfig/network
> file,
> FORWARD_IPV4=yes
> and rebooted the machine.

Ok this activated ip_forward when you did the reboot but you could have
activated it immediately it with the command below and not rebooted
until you wanted to.

> Also, I activate IP forwarding by using command:
> echo "1" > /proc/net/ip_forward

Ok this should have been:

  echo 1 > /proc/sys/net/ipv4/ip_forward

> After that, if I enter "/proc/sys/net/ipv4/ip_forward"; I get following
> error:
> "bash: /proc/sys/net/ipv4/ip_forward: Permission denied"

/proc is a virtual file system located in memory. You don't run it as a
command. It is a kernel parameter.

> I did cd to "/proc/sys/net/ipv4/ip_forward" directory and tried changing
> the permissions of the file.

You can't change permissions of a virtual file.

If you have enabled ip_forward then it is already running. What is it
you are trying to do exactly?

If you are having problems connecting to the internet then make sure you
have /etc/resolv.conf configured properly.

If you are having problems with ipchains or iptables then make sure that
the one you want is running.

/etc/rc.d/init.d/ipchains start # or restart

-- 
   Confucius:  He who play in root, eventually kill tree.
Registered with the Linux Counter.  http://counter.li.org


Loading