Re: Help on outgoing packet (without NAT)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.

Well I was convinced that, since I'm not using NAT on this machine, this couldn't be done on the NAT table.
Thanks, after all, it works.

Jorge,
--
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


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux