> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> work only if I'm root. It does not work using sudo.
This doesn't sound right. Maybe you should investigate why you're
seeing this behavior, rather than work around the problem.
`sudo` *is* root.
Stefan