reverse NATing
Hi,
I would like to know where exactly reverse mapping(packets coming from outside to the internal network) is done in the case of SNAT? From the netfilter documentation, it seems to be done in the POST_ROUTING hook. Is it true?
Logically I would expect the packet to be reverse mapped in the pre-routing state itself. Why would one want to reverse map it in post routing? I am sure I am missing something. Could anyone please enlighten me?
Any help would be appreciated.
Regards,
Vinay
I think you are talking about what seems to be the connection tracking, once a packet match a rule in the nat table it will use that rule until the connection is closed and in both sides.
Quoted 16 lines · Vinay Reddy
Hi,
I would like to know where exactly reverse mapping(packets coming from outside to the internal network) is done in the case of SNAT? From the netfilter documentation, it seems to be done in thePOST_ROUTINGhook. Is it true?
Logically I would expect the packet to be reverse mapped in the pre-routing state itself. Why would one want to reverse map it in post routing? I am sure I am missing something. Could anyone please enlighten me?Any help would be appreciated.
Regards,
Vinay