firewall - iptables
All
O script de firewall do gateway da rede de casa esta assim :
#!/bin/bash
IPTABLES=/sbin/iptables
# recover IPs
ETH0IP=`ifconfig eth0 | grep "inet addr:" | sed 's/.*inet addr://' |
cut -d ' ' -f 1`
ETH1IP=`ifconfig eth1 | grep "inet addr:" | sed 's/.*inet addr://' |
cut -d ' ' -f 1`
# clean all possible old mess
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
# masquerading
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
# closing ALL INPUT
$IPTABLES -P INPUT DROP
# port forward
for PROTO in tcp udp ; do
# opening important ports
# ftp - for remote support
$IPTABLES -A INPUT -i eth0 -p $PROTO --dport 21 -j ACCEPT
done
Quando eu tento rodar o script aparece a seguinte mensagem de erro :
Bad argument `21'
Try `iptables -h' or 'iptables --help' for more information.
Eu chequei o comando e aparentemente esta correto. Alguem teria alguma
ideia do por que esta aparecendo essa mensagem de erro ?!?!?!?
Desde ja agradeco pela ajuda.
.''`. Caio Abreu Ferreira
: :' : GNU/Linux Debian
`. `'` Gnupg ID 0x01186BE1
`-
Reply to: