PREROUTING
PREROUTING is a built-in chain in the Netfilter framework that processes incoming packets before a routing decision is made. It exists in multiple tables (raw, nat, and mangle) and is not part of the standard filter table’s INPUT/FORWARD chains. Packets traverse PREROUTING immediately upon arrival, then the kernel determines whether they are destined for the local host or should be forwarded.
The main purpose of PREROUTING is to inspect or modify packets before routing. In the nat table,
Common uses include implementing port forwarding and address translation for inbound traffic, performing early packet marking,
In practice, PREROUTING is a foundational tool for network address translation and early packet processing. While