ip forwarding - permission denied

Cameron Hutchison camh+ubuntu at xdna.net
Fri Apr 1 06:26:50 UTC 2005


Once upon a time Cameron Hutchison said...
> Once upon a time david said...
> > 
> > In my quest for a net connected Zaurus I seem to have hit a problem.
> > I need to enable ip forwarding with the following command.
> > 
> > sudo echo 1 > /proc/sys/net/ipv4/ip_forward
> > 
> > But all I get is "permission denied" and I don't understand why. Does
> > anyone know what I'm missing here?
> 
> The shell is trying to open the file with your permissions before sudo
> is even run. You will need to use quotes:
> 
> sudo "echo 1 > /proc/sys/net/ipv4/ip_forward"

scratch that. It doesn't work (and should not, otherwise there's a nice
security hole there). I should have tested it properly before posting.

Use Matt's solution.





More information about the ubuntu-users mailing list