LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-04-2016, 02:33 PM   #1
keenboy100
LQ Newbie
 
Registered: Sep 2016
Posts: 1

Rep: Reputation: Disabled
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,
 
Old 09-07-2016, 02:59 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,854

Rep: Reputation: 161Reputation: 161
Should like you said. Routing rule is processed in ROUTER hook before POSTROUTING hook.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables rules on pppoe connection. Need help forwarding / routing. Repgahroll Linux - Networking 1 09-23-2010 11:57 AM
Quagga for Linux Routing without SNAT or MASQUERADE. Zepiroth Linux - Networking 1 03-12-2007 11:01 AM
IPTables snat help DukeLeto Linux - Networking 1 10-01-2006 11:49 AM
using iptables to define routing rules helloaali Linux - Networking 5 08-29-2006 05:12 PM
SNAT, routing...... confused ede Linux - Networking 6 08-21-2003 10:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration