LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 03: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, 03:59 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,839

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:57 PM
Quagga for Linux Routing without SNAT or MASQUERADE. Zepiroth Linux - Networking 1 03-12-2007 12:01 PM
IPTables snat help DukeLeto Linux - Networking 1 10-01-2006 12:49 PM
using iptables to define routing rules helloaali Linux - Networking 5 08-29-2006 06:12 PM
SNAT, routing...... confused ede Linux - Networking 6 08-21-2003 11:38 PM

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

All times are GMT -5. The time now is 06:03 AM.

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