It is currently Wed Jun 19, 2019 11:46 am


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: NAT occur before or after routing?
PostPosted: Fri Dec 20, 2013 8:29 am 
Offline

Joined: Fri Nov 22, 2013 1:08 pm
Posts: 8
I got one question,Does NAT occur before or after routing? We have two ISPs, so I wonder if nat occor after route. Someone know about this?




Top
 Profile  
 
 Post subject: Re: NAT occur before or after routing?
PostPosted: Sun Feb 02, 2014 1:36 am 
Offline

Joined: Fri May 04, 2012 11:37 am
Posts: 57
Location: Point Cook, Australia
hi_gns3,

On Linux, there are 2 modes of NAT - PREROUTING and POSTROUTING (at least in-so-far as Linux is concerned, but I'd imagine that would be a standard) which translates to DNAT and SNAT respectively.

Have a look at this PDF document of how iptables on Linux does NAT:
http://www.aptalaska.net/~jclive/IPTablesFlowChart.pdf


Cheers,
ak.


Top
 Profile  
 
 Post subject: Re: NAT occur before or after routing?
PostPosted: Sun Feb 02, 2014 4:05 pm 
Offline

Joined: Sun Feb 02, 2014 4:02 pm
Posts: 1
hi_gns3 wrote:
I got one question,Does NAT occur before or after routing? We have two ISPs, so I wonder if nat occor after route. Someone know about this?


Destination nat (DNAT) occurs before routing (obviously, it shoud be "prerouting" because routing is done based on the destination address). Source nats (e.g. PATs) occure after routing, before exitting output interface. This way it is possible to filter packets before they got their headers modified (natted).




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO