08-04-2010, 08:10 PM
Prerouting comes before Input which comes before postrouting IIRC.
You could hook onto the prerouting chain (change INPUT to PREROUTING) instead of the input chain, but that isn't really what the prerouting chain is for.
Depending on how your linux router is configured to forward packets, I think either changing to the forward chain (change INPUT to FORWARD) or leaving it on the input chain (change nothing) should work.
The first thing I'd do is try the forward chain, then I'd try leaving it as the input chain, then if that fails, the prerouting chain should work in any case, but isn't really what the prerouting chain is for.
You could hook onto the prerouting chain (change INPUT to PREROUTING) instead of the input chain, but that isn't really what the prerouting chain is for.
Depending on how your linux router is configured to forward packets, I think either changing to the forward chain (change INPUT to FORWARD) or leaving it on the input chain (change nothing) should work.
The first thing I'd do is try the forward chain, then I'd try leaving it as the input chain, then if that fails, the prerouting chain should work in any case, but isn't really what the prerouting chain is for.