I would like to ask what happens internally when redirecting using Tproxy.
iptables -t mangle -A PREROUTING -p tcp --dport 443 -j TPROXY --tproxy-mark 1 --on-port 40001
It located in PREROUTING
in the mangle table of iptables.
As far as I know, the routing decision is made after the PREROUTING
chain.
When redirecting using Tproxy as above.
Packet through ip rule
& routing table
? Or does it go directly to the local 40001 port?