How do I connect a computer to 2 internet connections (two gateways) at
once and setup routes in such way, so when a packet comes in from a
public network, it replies back through the same interface and not
through the default gateway. And I want to do all that with suse's
ifroute scripts. I have already implemented this using iproute with a
script like this.

#!/bin/bash

IF1=bond0
IP1=192.168.10.5
NET1=192.168.10.0/24
GATE1=192.168.10.52

IF2=vlan20
IP2=192.168.20.5
NET2=192.168.20.0/24
GATE2=192.168.20.1

ip route add $NET1 dev $IF1 src $IP1 table T1
ip route add default via $GATE1 table T1

ip route add $NET2 dev $IF2 src $IP2 table T2
ip route add default via $GATE2 table T2

ip rule add from $IP1 table T1
ip rule add from $IP2 table T2

The downside of this is that I had to modify /etc/init.d/network to
include this script in the network startup process. As soon as I update
the system my changes got overridden. Besides I should probably do it
the intended Suse way anyways, that is of course if such way exists. I
tried using ifroute scripts before but could not get desired outcome.
Please advise on how to use ifroute scripts or perhaps tell me how can i
integrate my script better with network script.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to