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

Re: IP Masquerading



Scott Cleveland wrote:
> 
> I got ip masqurading working.
>         My only problem is that I have to change the value of
> /proc/sys/net/ipv4/ip_forward to 1 every time I reboot.
>         I have to change it with vi and when I save the file, vi gives me the
> fallowing message:  the file has changed since reading it!!!.  I select to
> over write it anyway and it works till I reboot

at the end of the file /etc/rc.d/rc.local is a place intended for commands to be
executed at every boot.

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

is in mine.

> 
>         I have to do it this way, if I type /proc/sys/net/ipv4/ip_forward at the
> prompt, I get Permition Denied.  I am root when I do this.

if this is what you enter at the bash prompt, you are trying to execute the
file.

[root@samsrv /root]# ls -la /proc/sys/net/ipv4/ip_forward
-rw-r--r--    1 root     root            0 Dec 10 07:50
/proc/sys/net/ipv4/ip_forward

which would explain the permission denied due to the file not being executable.

[root@samsrv /root]# cat /proc/sys/net/ipv4/ip_forward
0
[root@samsrv /root]# echo 1 > /proc/sys/net/ipv4/ip_forward
[root@samsrv /root]# 
1

The greater than symbol is a redirection symbol taking the standard output of
the command on the left and sending it to the file on the right.  > overwrights
the file and >> appends.

Hope this helps.

Dirk
> 
> Than the value is reset to 0 agan.
> 
> Any ideas???
> 
> Thank you
> 
> Scott A. Cleveland
> _____________________________________________________________________________________
> Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com