iptables1.0.0 probles

Richard Gooch rgooch@ras.ucalgary.ca
Tue, 4 Apr 2000 08:56:54 -0600


Nick Vanderest writes:
> Why do I get invalid arguments and problems with targets on the
> script below?  If someone wants to correct it for me, or tell me just 
> what the hell I am doing wrong, I would appreciate it.  
> 
> 
> IPT="/usr/local/bin/iptables"
> 
> $IPT -F
> $IPT -F -t nat
> 
> $IPT -A POSTROUTING -t nat -s 10.10.10.0/24 -j MASQUERADE
> $IPT -P FORWARD ACCEPT
> echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> $IPT -A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -j ACCEPT
> $IPT -A INPUT -s 10.10.10.1/32 -d 0/0 -j ACCEPT
> 
> $IPT -A INPUT -p udp --sport 53 -j ACCEPT
> $IPT -A INPUT -p tcp --sport 113 -j ACCEPT
> $IPT -A INPUT -p tcp --dport 113 -j ACCEPT
> $IPT -A INPUT -p tcp --dport 80 -j ACCEPT
> 
> $IPT -A INPUT -p tcp ! --syn --sport 20 --dport 1024:65535 -j ACCEPT
> 
> $IPT -A INPUT -p icmp -j firewall
> $IPT -A INPUT -p tcp --syn -j firewall
> $IPT -A INPUT -p udp -j firewall

It would help if you were to post the error message for the particular
command(s) that fail. This would save uss all having to inspect each
command line!

				Regards,

					Richard....
Permanent: rgooch@atnf.csiro.au
Current:   rgooch@ras.ucalgary.ca