NAPT changes source port number

I’m using NAPT on an FXT009 and all is correctly configured and working for inbound traffic.

The problem I’m having is for outbound traffic. I’m using port 4444. The FXT009 is correctly setting the IP address and port number for the destination in the packet, is correctly setting the source IP address, but is changing the port number for the source. This I don’t want because my destination is blocking the packet, because it insists on the port number agreeing for both the source and the destination. I can’t change the firewall settings.

The FXT009 changes the source port number randomly to a value like 61009; next packet it chooses the next port number. I just want it to leave the port number alone; change the source IP address but leave the port number alone.

Anyone met this and can offer a solution?

Just to add further detail :

I’m using the Gateway example, so using the Ethernet bearer and the GPRS bearer. I’ve disabled DHCP to use a fixed IP address for the device connected to Ethernet. I’ve set up port forwarding for incoming packets and this all works fine.

The device behind the FXT009 calls out on port 4444. The IP address handling is working as expected. I can see on the NET trace that the port number is being altered on the FXT009, so it isn’t being done by the system I connect to, it’s being done by the FXT009. I want to stop this happening.

I’ve spoken to the distributor and he is insisting that all TCP packets work like this. Outbound packets have the source port number altered to a random number. This is what I see and he maintains this is correct. My problem is that the destination application (I thought it was the firewall but turns out it is the application) checks and insists that the destination port number and the source port number be the same.

Any thoughts?

Yes, what your distributor told is right. This is how TCP is implemented…