Docker as a router

Hi,
I want to launch a docker container as a router. My host sends packets that goes to the docker container. In the container an application does some headers modifications and routes to the destination.

The return packet arrives at my host and then I want the packet to go to the container, but it doesn’t.

How can I configure this scenario to do that?

Thanks.

P.D: Sorry for my english.