Port forwarding is indeed activated. Don't forget that the masquerading does work, and port forwarding would have to be switched on for even this to happen.
I've tried using the full --to-destination flag instead of the abbreviation but it makes no difference.
I reordered the flags as you suggested, but nada
ifconfig and route check out fine, don't forget that IP masquerading is working a treat - it's just the port forwarding that isn't. ifconfig and route would surely have to be correct for masquerading to do anything.
Here is the output from iptables -nvL:
Chain INPUT (policy ACCEPT 54 packets, 3425 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- eth0 eth1 0.0.0.0/0 0.0.0.0/0 tcp dpt:23 state NEW,RELATED,ESTABLISHED
0 0 ACCEPT all -- eth0 eth1 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT all -- eth1 eth0 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
42 4279 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
... and the output from iptables -t nat -vn -L:
Chain PREROUTING (policy ACCEPT 1250 packets, 101K bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- * * 0.0.0.0/0 212.21.109.138 tcp dpt:23 to:172.28.221.2
Chain POSTROUTING (policy ACCEPT 8852 packets, 483K bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * eth0 172.28.221.0/24 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 8852 packets, 483K bytes)
pkts bytes target prot opt in out source destination
I've also checked, double checked and triple checked the kernel configuration. Indeed, I'm lead to believe that this is alright because of the fully functioning IP masquerading. I'd understand more if neither port fowarding or masquerading worked, but this is crazy!
Thanks for your help.
Stuii!