Linux Netfilter discussions
 help / color / mirror / Atom feed
* multi-isp connection NAT not working
@ 2005-09-28 16:51 Daniel Wittenberg
  2005-09-28 18:24 ` /dev/rob0
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Wittenberg @ 2005-09-28 16:51 UTC (permalink / raw)
  To: netfilter

I think this is a simple problem, but nothing I've read so far seems to
help, maybe I'm missing something.

ISP-1 (eth0) --  
                \
                 --- FIREWALL --- server
                /
ISP-2 (eth1) --

I'm just trying to get an IP on both ISP's that will allow me to connect
to server.  Right now I can connect to firewall from either ISP ok, it
is just getting through the firewall's NAT to the server, but only from
one connection.  I've put debug statements in iptables the packets seem
to go as far as NAT then not sure where they are going.  I've tried:

route add default via {ISP-1-gateway} table T1 dev eth0
rule add from {ISP-1-ip} table T1
rule add fwmark 1 table T1
iptables -t mangle -A PREROUTING -i eth0 -j MARK --set-mark 1

route add default via {ISP-2-gateway} table T2 dev eth1
rule add from {ISP-2-ip} table T1
rule add fwmark 2 table T1
iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 2

Any ideas?

Thanks,
Dan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: multi-isp connection NAT not working
  2005-09-28 16:51 multi-isp connection NAT not working Daniel Wittenberg
@ 2005-09-28 18:24 ` /dev/rob0
  2005-09-28 19:27   ` Daniel Wittenberg
  0 siblings, 1 reply; 3+ messages in thread
From: /dev/rob0 @ 2005-09-28 18:24 UTC (permalink / raw)
  To: netfilter

On Wednesday 2005-September-28 11:51, Daniel Wittenberg wrote:
> I think this is a simple problem, but nothing I've read so far seems
> to help, maybe I'm missing something.

A serious typo?

> route add default via {ISP-1-gateway} table T1 dev eth0
> rule add from {ISP-1-ip} table T1
> rule add fwmark 1 table T1

Prepend "ip " to those.

> iptables -t mangle -A PREROUTING -i eth0 -j MARK --set-mark 1

ok

> route add default via {ISP-2-gateway} table T2 dev eth1
> rule add from {ISP-2-ip} table T1
> rule add fwmark 2 table T1

Again prepend "ip " and s/T1/T2/

> iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 2
>
> Any ideas?

I use and recommend Julian Anastasov's routes patch. Usage is explained 
in http://www.ssi.bg/~ja/nano.txt , the patches are linked from the 
parent directory. IWFM at 3 sites.
-- 
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: multi-isp connection NAT not working
  2005-09-28 18:24 ` /dev/rob0
@ 2005-09-28 19:27   ` Daniel Wittenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Wittenberg @ 2005-09-28 19:27 UTC (permalink / raw)
  To: /dev/rob0; +Cc: netfilter

Actually I've abstracted it in a script and the function name adds "ip",
just wasn't watching when I copy/pasted :(

I'll take a look, thanks.
Dan


On Wed, 2005-09-28 at 13:24 -0500, /dev/rob0 wrote:
> On Wednesday 2005-September-28 11:51, Daniel Wittenberg wrote:
> > I think this is a simple problem, but nothing I've read so far seems
> > to help, maybe I'm missing something.
> 
> A serious typo?
> 
> > route add default via {ISP-1-gateway} table T1 dev eth0
> > rule add from {ISP-1-ip} table T1
> > rule add fwmark 1 table T1
> 
> Prepend "ip " to those.
> 
> > iptables -t mangle -A PREROUTING -i eth0 -j MARK --set-mark 1
> 
> ok
> 
> > route add default via {ISP-2-gateway} table T2 dev eth1
> > rule add from {ISP-2-ip} table T1
> > rule add fwmark 2 table T1
> 
> Again prepend "ip " and s/T1/T2/
> 
> > iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 2
> >
> > Any ideas?
> 
> I use and recommend Julian Anastasov's routes patch. Usage is explained 
> in http://www.ssi.bg/~ja/nano.txt , the patches are linked from the 
> parent directory. IWFM at 3 sites.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-28 19:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28 16:51 multi-isp connection NAT not working Daniel Wittenberg
2005-09-28 18:24 ` /dev/rob0
2005-09-28 19:27   ` Daniel Wittenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox