All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitri Yioulos <dyioulos@onpointfc.com>
To: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Dual WAN set-up
Date: Fri, 13 Jan 2012 10:22:04 -0500	[thread overview]
Message-ID: <201201131022.05220.dyioulos@onpointfc.com> (raw)
In-Reply-To: <201201131017.22019.dyioulos@onpointfc.com>

On Friday 13 January 2012 10:17:21 am you wrote:
> On Friday 13 January 2012 9:17:20 am Lloyd Standish wrote:
> > On Fri, 13 Jan 2012 01:25:45 -0600, Andrew Beverley
>
> <andy@andybev.com> wrote:
> > > Using marks is one way to do this, and provides plenty of
> > > flexibility. However, if all the traffic is coming from the
> > > same IP address / interface, then you should be able to use
> > > straight iproute2 rules to match those aspects, without
> > > even touching iptables (see ip rule).
> > >
> > >> 	iptables -t mangle -A PREROUTING -m state --state NEW
> > >> -s 10.x.x.x -j CONNMARK1
> >
> > That's a good point.  In my own firewall, at one point I
> > wanted to avoid load-balancing for certain hosts (i.e.,
> > always route through a given interface for a certain source
> > IP), and I was unable to use "ip rule" with no packet
> > marking.  However, I think this is because all the hosts were
> > internal LAN hosts using SNAT, and the NAT is done before the
> > packet hits "ip rule."  Therefore "ip rule" could not match
> > on the source IP. But in Dimitri's case, since there is no
> > NAT for the DMZ hosts, this should work fine, and is simpler.
> >  The only reason to mark packets would be to allow the
> > possibility of later routing some of the LAN hosts through
> > the second interface.
> >
> > >Also, if you do decide to use netfilter marks (which is
> > > certainly no bad thing IMHO), then you probably don't need
> > > to mark connections and then restore them. Instead just
> > > mark a packet straight away: iptables -t mangle -A
> > > PREROUTING -s 10.x.x.x -j MARK --set-mark 1
> >
> > Another very good point for Dimitri, Andy, which should give
> > better efficiency.  Connection marking is only necessary for
> > load-balancing. I guess I am in a "load-balancing" mindset.
> >
> > --
> > Lloyd
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > netfilter" in the body of a message to
> > majordomo@vger.kernel.org
> > More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
>
> Lloyd,
>
> Not to throw a proverbial wrench in the works, but in my case
> there is NAT for the DMZ hosts.
>
> I have three NICs currently active on the fw (more are
> available): eth0 - WAN, eth1 - LAN, eth2 - DMZ.  In addition,
> eth0 has several aliases for the external addresses of the DMZ
> boxes. Then, NAT to internal addresses (10.x.x.x).
>
> Hope I'm not muddying the waters but, rather, providing all of
> the info that you need to so kindly help me.
>
> Dimitri


Er, sorry, seems like I don't even remember my own network scheme.  
internal LAN addresses are 192.168.100.0/22, and internal DMZ 
addresses are 192.168.1.0/24.  (The 10.x.x.x addresses are used 
by our VPN.)

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


  reply	other threads:[~2012-01-13 15:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 21:51 Dual WAN set-up Dimitri Yioulos
2012-01-12 22:28 ` Andrew Beverley
2012-01-12 22:48   ` Dimitri Yioulos
2012-01-13  7:18     ` Andrew Beverley
2012-01-12 23:08 ` Lloyd Standish
2012-01-12 23:12   ` Lloyd Standish
2012-01-12 23:22     ` Dimitri Yioulos
2012-01-12 23:19   ` Dimitri Yioulos
2012-01-13  0:52   ` Lloyd Standish
2012-01-13  7:25   ` Andrew Beverley
2012-01-13 11:47     ` Dimitri Yioulos
2012-01-13 14:17     ` Lloyd Standish
2012-01-13 15:17       ` Dimitri Yioulos
2012-01-13 15:22         ` Dimitri Yioulos [this message]
2012-01-14  2:27           ` Lloyd Standish
     [not found]           ` <201201160956.23955.dyioulos@onpointfc.com>
2012-01-16 20:28             ` Lloyd Standish
2012-01-13 20:00         ` Lloyd Standish
2012-01-13 20:04           ` Dimitri Yioulos
  -- strict thread matches above, loose matches on Subject: below --
2012-01-16 21:43 Dimitri Yioulos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201201131022.05220.dyioulos@onpointfc.com \
    --to=dyioulos@onpointfc.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.