{"id":54,"date":"2008-07-30T14:09:06","date_gmt":"2008-07-30T14:09:06","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2008\/07\/30\/client-vs-server-side-nat\/"},"modified":"2023-02-04T09:12:24","modified_gmt":"2023-02-04T09:12:24","slug":"client-vs-server-side-nat","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/Firewalls\/Checkpoint\/client-vs-server-side-nat.html","title":{"rendered":"Check Point – Client vs Server Side NAT"},"content":{"rendered":"

Introduction<\/strong><\/h3>\n

Client and Server side NAT relates to when we perform destination NAT`ing.
\nThe “Translate destination on Server side” option is an legacy option which was included due to pre NG versions of checkpoint using Server-Side NAT.<\/p>\n

Client Side NAT<\/strong> – The destination address is NAT`d by the inbound Kernel
\nServer Side NAT<\/strong> – The destination address is NAT`d by the outbound Kernel<\/p>\n

 <\/p>\n

 <\/p>\n

Note<\/strong><\/em> : Source NAT always happens on the Outbound Kernel.
\nNote<\/em><\/strong> : Rule > NAT – The kernels will\u00a0 always process the rules before the NAT.<\/p>\n

So why does this matter ?<\/strong><\/h3>\n

Well when we use client side NAT the IP address is NAT`d before it hits the routing table. So we can route the packet based on the real IP.
\nBut when we use Server side NAT the IP is NAT`d after passing the routing table so there has to be a route for NAT`d (fake) IP in the routing table so that the operating system can pass the packet to the correct interface.<\/p>\n

To explain things a little easier have a look at the diagram below,<\/p>\n

 <\/p>\n

\"Check <\/picture><\/p>\n

So we want to access the server (10.8.8.1). If we use Client Side NAT<\/strong> the inbound kernel will NAT the destination IP (192.168.8.1) to the real IP (10.8.8.1) and then pass the packet to the (OS) routing table. Which as you can see will have the routing entry for this subnet and pass it out (via the outbound kernel) to the interface (eth0).<\/p>\n

But if we use Server Side NAT<\/strong> the packet would not get NAT`d by the inbound kernel. It would get to the (OS) routing table with a destination of 192.168.8.1. Which, there is no entry for. We would need to add an entry to the routing table.\u00a0 Once added the operating system would know where to route this packet, the packet would pass through the outbound kernel which would NAT the destination IP to 10.8.8.1.<\/p>\n

Note:<\/em> Client AND Server side NAT are options ONLY for destination NAT. <\/strong><\/h4>\n

 <\/p>\n

Additional<\/strong><\/h3>\n