All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evan Pierce <evan@pierce.co.za>
To: John Lister <john.lister@kickstone.com>
Cc: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Load Balancing issue
Date: Mon, 11 Apr 2011 18:23:46 +0200	[thread overview]
Message-ID: <4DA32B12.40309@pierce.co.za> (raw)
In-Reply-To: <4DA32055.9030904@kickstone.com>


> Generally, i have separate tables that do the mark/saving so as to only
> put the rules in once.
> I also have a route for the local net in my fwmark(ed) tables.
> 
> 
> Hope that helps
> 
> John
> 
> 
> -- 
> 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
> 

John

I now have rules as such

ip route add table 4 default via 192.168.1.1
ip route add table 4 192.168.11.0/24 via 192.168.11.1
iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark
iptables -t mangle -A PREROUTING -p tcp --dport 80 -s 192.168.11.0/24 -j
MARK --set-mark 4
iptables -t mangle -A PREROUTING -p tcp --dport 443 -s 192.168.11.0/24
-j MARK --set-mark 4
iptables -t nat -A POSTROUTING -o $EXTERNAL2 -j SNAT --to-source 192.168.1.2
iptables -t nat -A POSTROUTING -o $EXTERNAL -j SNAT --to-source 196.212.0.42
iptables -t mangle -A PREROUTING -j CONNMARK --save-mark
ip rule add fwmark 4 table 4
ip route flush cache

Still no joy - maybe soemthing I need to fiddle with under /proc/sys?

Evan

  reply	other threads:[~2011-04-11 16:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11  9:35 Load Balancing issue Evan Pierce
2011-04-11 12:31 ` John Lister
     [not found]   ` <4DA2FB80.4050306@pierce.co.za>
2011-04-11 15:37     ` John Lister
2011-04-11 16:23       ` Evan Pierce [this message]
2011-04-11 17:46 ` Andrew Beverley

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=4DA32B12.40309@pierce.co.za \
    --to=evan@pierce.co.za \
    --cc=john.lister@kickstone.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.