next up previous contents
Next: Example: minimal host setup Up: Route NAT status Previous: How it works.   Contents

How to only translate selected ports:

If you only want to translate selected ports (f.e. http) and leave the rest intact, you may use ipchains to fwmark a class of packets. Suppose you did and all the packets from 193.233.7.83 destined for port 80 are marked with marker 0x1234 in input fwchain. In this case you may replace rule #320 with:
320:	from 193.233.7.83 fwmark 1234 lookup main map-to 192.203.80.144
and translation will only be enabled for outgoing http requests.