Linux – iptables FORWARD packets from one chain to another

iptableslinux

I have 4 Chains in my iptables table – INPUT, OUTPUT, FORWARD and MYCUSTOM-CHAIN

Now, i have a rule in my INPUT chain that filters all tcp traffic with destination port as 23. I need to re-route all this traffic to MYCUSTOM-CHAIn.

Please let me know if that's possible?

Best Answer

-A INPUT -p tcp --destination-port 23 -j MYCUSTOM-CHAIN