I'm using NAT with overload to translate IP adresses from a small office into an IP adress from the main office. The connection from the branch office with the main office is OK and the NAT is working, but the connection between main office and small office doesn't work. I think that is due to the reponse packets are being translate when they are travelling through the inside interface. How can I resolve this issue?
While Oussama makes some interesting points I believe that the fundamental problem is different than what he describes. NAT as you are doing it (which is actually PAT since you are translating multiple inside addresses to a single outside address) creates an entry in the translate table when it sees outgoing traffic from the inside interface. This allows an inside host to initiate traffic and when an outside host responds there is an entry to translate back to the correct inside address.
But PAT does not support traffic initiated from an outside host (at the main office) to reach a remote host (at the branch office) since it does not know what entry in the translate table to use.
Perhaps another way to look at this issue is that if the inside host has address 192.168.1.5 the host at the main office does not have any route to get to that address and there may not be any entry in the translate table for that address (and even if there were an existing translate entry, how would the main office host know what it was?).
So if you have a requirement for main office hosts to initiate traffic to the branch office hosts then you will need some different solution. In some cases it is possible to not translate traffic from the remote office going to the main office and provide a routing entry at the main office for the remote office network, and just translate for traffic from the branch that is going outside of the enterprise network. Perhaps that could work for you?