Iptables workflow
When the user request message arrives, it will first go through PREROUTING. There are three tables on it, and it will arrive at raw,mangle,nat first according to priority.
After the local route has made a decision, there are two flows: either FORWARD (forwarding) or INPUT inflow into the station
If you reach the INPUT chain, you can do two functions: mangle natfilter first mangle, then nat, then filter. The response message received by the native LocalProcess is decided by the Routing Decision and sent to the OUTPUT,er OUTPUT. The priority of the table above is raw mangle natfilter.
Similarly, it is the same with FORWARD, and then it is up to Rouing Decision to decide which network card will flow out.
After the data flow on OUTPUPT and FORWARD is decided by Routing Decision, it is sent to POSTROUTING and finally to the Internet.