Ing. Rogelio Sevilla Fernandez wrote:
I recently compiled kernel 2.4.29 with all netfilter options as modules.
All start ok, but when i set the MASQUERADE jump target on POSTROUTING
i got:
iptables -t nat -I PREROUTING -o eth0 -j MASQUERADE
iptables: target problems.
when using PREROUTING rules, you should specify the incoming interface,
not the outgoing.
Or, said the other way around: when using an outgoing interface, you
should specify POSTROUTING rules.
So, because you try to masquerade, what you really want is:
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
See section 5 in the NAT-howto for iptables.
Hope this helps.
Regards,
Geert van der Ploeg