To use iptables for port redirection, the method is as follows:
To operate on machine A:
#iptables-T nat-a prerouting-d 192.168.203.173-p tcp-m tcp--dport 80-j DNAT--to-destination 192.168.203.235
#iptables-T nat-a postrouting-d 192.168.203.235-p tcp-m tcp--dport 80-j SNAT--to-source 192.168.203.173
These two policies redirect the destination address to machine B and the request with destination port 80 to machine B
#service iptables Save
#service iptables Start
One problem with this is that the requests you see on machine B come from machine A, but you can use transparent mode to see the actual source address on machine B:
#iptables-T nat-a prerouting-d 192.168.203.173-p tcp-m tcp--dport 80-j DNAT--to-destination 192.168.203.235
#iptables-T nat-a postrouting-d 192.168.203.235-p TCP--dport 80-j Masquerade
The above two lines of policy can be implemented in transparent mode port forwarding.
Iptables for Port redirection