[lug] dumb q....echo 1?
hirsch at zapmedia.com
hirsch at zapmedia.com
Thu Apr 4 07:45:51 MST 2002
j davis writes:
>
> hi,
>
> so im rebulding my firwall with the help of the best iptables how
> to i have ever read
> http://www.boingworld.com/workshops/linux/iptables-tutorial (thats quite a
> few now). Anyway in a example script
> this is used
>
> echo "1" > /proc/sys/net/ipv4/ip_forward
>
> so i think the text "ip_forward" is being written to /proc/sys/net/ipv4..
> what is the "1" for? Also proc is the ram right? could some one explain
> why i have to do this and what is really happening when i do this.
I think you have misunderstood that line. The command: echo "1"
will just print the numeral 1 on your terminal, so
echo "1" > /proc/sys/net/ipv4/ip_forward
will send the numeral to the file /proc/sys/net/ipv4/ip_forward.
The /proc directory and its children are a direct line to the kernel,
and 1 is true. So you are telling the kernel that it should activate
the ip_farward feature of it ipv4 (Internet Protocol 4, or the
standard internet netwroking stuff) part of the networking system.
In other words, "start doing IP forwarding".
Hope that clarifies it a bit,
--Michael
More information about the LUG
mailing list