LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Routing and iptables SNAT rules (https://www.linuxquestions.org/questions/linux-networking-3/routing-and-iptables-snat-rules-4175588714/)

keenboy100 09-04-2016 02:33 PM

Routing and iptables SNAT rules
 
Hi Guys,

I have a question regarding policy routing rules and iptables POSTROUTING NAT rules.

If I have some policy routes in place that routes based on source subnet via a default route of an additional WAN interface and also an iptables SNAT rule which changes the source address of packets originating from the same source subnet to the corresponding WAN interface address, am I right in thinking a packet originating from the source subnet will be routed via the routing rule and then processed via the iptables POSTROUTING SNAT rule?

Thanks,

nini09 09-07-2016 02:59 PM

Should like you said. Routing rule is processed in ROUTER hook before POSTROUTING hook.


All times are GMT -5. The time now is 02:23 PM.