[plug] masq cameron tony
James Devenish
devenish at guild.uwa.edu.au
Tue Dec 16 18:48:43 WST 2003
Hi,
In message <6.0.0.22.0.20031216175640.01b264d0 at pop.ozemail.com.au>
on Tue, Dec 16, 2003 at 06:18:17PM +0800, smclevie wrote:
> Have twiddled and fiddled Camerons script. I have picked up a number of
> <carriage-returns>... in amongst the commands (That is ONE reason for
> using WORD ..! I can see the hidden characters ...)
This is going to sound silly, but: there should only be end-of-line
characters at the ends of lines :-) Also, as a side note, most reputable
Linux (or UNIX) text editors will show 'hidden characters', too.
> Anyway, here is my revised script.
> _______________________________________________________________________________
>
> #! /bin/sh
>
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
>
> LAN_NET=192.168.0.0/255.255.255.0
> INET_IP="`ip addr show dev ppp0 | grep ' inet ' | awk '{print$2}' | cut -d/
> -f1`"
Just to clarify: the -f1`" forms part of the previous line.
> #echo " Forward traffic for locally-originated connections "
> #for chain in FORWARD INPUT OUTPUT do iptables -A ${chain} -m state --state
> ESTABLISHED,RELATED -j ACCEPT done
The 'for' loop must be split onto three separate lines, or modified to
fit onto a single line. I wonder if Eudora is unfortunately messing up
the text for you? Here is a one-line version of Cameron's original (it
will appear as two lines, but you should join them back together):
for chain in FORWARD INPUT OUTPUT; do iptables -A ${chain} -m state
--state ESTABLISHED,RELATED -j ACCEPT; done
More information about the plug
mailing list