Em 22/09/11 12:58, Jorge Bastos escreveu:
Correct, local generated packets.
Tried:
iptables -I OUTPUT -d 5.5.5.5 -p tcp --dport 80 --redirect-to
192.168.1.221:80
I'm missing something but not sure what, but it's on the redirect part.
Your rule is absolutely incomplete and nonsense
packet redirections should be done on the NAT table. If no table is
specified on the command, you'll work on the filter table, which is not
the one you want here. So '-t nat' is needed.
the '--redirect-to' is not an argument for any of the known targets
i know .... but as it seems you want to redirect some packet to another
machine, than you'll probably want the DNAT target. Anyway, you have not
specified any target, so iptables simply doesnt know what to do.
calling the correct target with correct argument, your rule should
look something like:
iptables -t nat -I OUTPUT -d 5.5.5.5 -p tcp --dport 80 -j DNAT
--to-destination 192.168.1.221
no need to specify the :80 port to the destination target. If you
want to redirect to the same port, you dont need to specify that. You
would need to specify if you were changing ports.
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
gertrudes@xxxxxxxxxxxxxx
My SPAMTRAP, do not email it
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html