SNAT & Squence Numbers

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

 



> - A syntax question. I've looked at alot of syntax
> examples and I've noticed one character that I can't
> seem to match up with any of the tutorials or man pages.
> $IPTABLES -A INPUT $WAN_IFACE \ -j DROP
> What the heck is "\"? It looks like it would be used to
> separate the match and the target, but is not really
> necessary. Is this just a personal preference or is
> it needed?

"\" is used to continue a line on the next line.
The "\" char itself will be discarded when all lines are put together the
command is executed.

Take the following line :
iptables -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
This could (if you wanted to) be rewritten as :
iptables -A INPUT \
         -i eth0 \
         -m state --state RELATED,ESTABLISHED \
         -j ACCEPT


Rob




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux