[SOLVED] Pre-routing and post-routing

derek wildstar

Reputable
Feb 14, 2020
38
0
4,530
I've been doing some reading about networking, but I still can't figure out what pre-routing and post-routing really do, and what is the difference between them.
What would be a typical pre-routing (and post-routing) operation?
Furthermore what these so called pre-routing and post-routing operations do than "normal" routing operations don't do already?
Can you help me with this?
Thank you
 
Solution
From my first link:

------------------------
What we are interested are the nat table and its builtin chains PREROUTING, OUTPUT and POSTROUTING; and the mangle table and its builtin chains, PREROUTING and OUTPUT.

For the nat table, the PREROUTING chain is for altering packets before they are routed and POSTROUTING is for altering packets as they are leaving the system. The OUTPUT chain is for altering packets that are generated locally before they are routed.
-------------------------

Basically, how packets are moved around in the NAT networking subsystem.

For instance, there may be a case where you don't want the destination to know what IP address a...
What have you found in your research?

https://www.cs.montana.edu/courses/spring2004/409/topics/nat/outline.html

I found this:

https://wiki.mikrotik.com/wiki/Manual:Packet_Flow

but it hardly makes sense to me. I'm not an expert.
I just hoped that someone were so kind to explain it to me in simple terms. I don't need all the details.
Thank you
 
From my first link:

------------------------
What we are interested are the nat table and its builtin chains PREROUTING, OUTPUT and POSTROUTING; and the mangle table and its builtin chains, PREROUTING and OUTPUT.

For the nat table, the PREROUTING chain is for altering packets before they are routed and POSTROUTING is for altering packets as they are leaving the system. The OUTPUT chain is for altering packets that are generated locally before they are routed.
-------------------------

Basically, how packets are moved around in the NAT networking subsystem.

For instance, there may be a case where you don't want the destination to know what IP address a packet came from.

Generally, this is not something we need to worry about, unless you are deep into configuring a large network.
 
  • Like
Reactions: derek wildstar
Solution