On Fri, Oct 03, 2003 at 04:55:27PM +0800, ketsugi wrote:
> I must be stupid; I only just realized (from trying out other firewall
> scripts) that I should use a colon to denote port ranges and not a dash. >_<
> 
> I do have one more thing to add, though. in the port forward variable I am
> only allowed to have one line and I can't use a backslash "\" to separate
> the single variable into multiple lines for readability. I'd also like to be
> able to add comments to each line, so that I'll be able to remember later
> what each port is used for.

Really?? I use line continuations in mine (see below).  You can't put
per comments as they would be in the middle of the variable.

PORT_FORWARDS="$EXT_IP(25)-192.168.10.2(25) \
                $EXT_IP(993)-192.168.10.2(993)" 


> I would prefer it to look something like this:
> 
> PORT_FORWARDS="$EXT_IP(37)-192.168.0.100(37) \ 
> $EXT_IP(63)-192.168.0.100(63) \
> $EXT_IP(21)-192.168.0.100(21) \ #ftp daemon
> $EXT_IP(443)-192.168.0.100(443) \
> $EXT_IP(113)-192.168.0.100(113) \ #identd for IRC
> $EXT_IP(123)-192.168.0.100(123) \
> $EXT_IP(59)-192.168.0.100(59) \ #mirc dccserver
> $EXT_IP(1024:1048)-192.168.0.100(1024:1048) \ #mirc dcc ports
> $EXT_IP(1863)-192.168.0.100(1863) \
> $EXT_IP(6891:6892)-192.168.0.100(6891:6892) \ #msn messenger
> $EXT_IP(5120:5300)-192.168.0.100(5120:5300) \ #neverwinter nights
> $EXT_IP(6500)-192.168.0.100(6500) \ #neverwinter nights
> $EXT_IP(27900)-192.168.0.100(27900) \ #neverwinter nights
> $EXT_IP(28900)-192.168.0.100(28900) \ #neverwinter nights
> $EXT_IP(22)-192.168.0.101(22)" #ssh into laptop

Drop the per line comments and it should work just fine.  I suggest
moving them to just prior to the variable definition.

-- 
Jamin W. Collins

This is the typical unix way of doing things: you string together lots
of very specific tools to accomplish larger tasks. -- Vineet Kumar

Reply via email to