0

I'm using iptables to implement forwarding on one server, that is support to forward traffic from an internal network to the internet (tutorial: http://www.revsys.com/writings/quicktips/nat.html)

On a client machine within the internal network, I defined this server as gateway within '/etc/network/interfaces':

auto eth1
iface eth1 inet static
      address 192.168.0.203
      netmask 255.255.255.0
      network 192.168.0.0
      broadcast 192.168.0.255
      gateway 192.168.0.201

Now I was wondering if it is possible to setup a second server in the same way as the first one, so it can be used in case the first one is unavailable. Then I should be able to somehow define two gateway server:

auto eth1
iface eth1 inet static
      address 192.168.0.203
      netmask 255.255.255.0
      network 192.168.0.0
      broadcast 192.168.0.255
      gateway 192.168.0.201 192.168.0.202

I guess this doesn't work exactly like this, but is it generally possible?

1 Answer 1

0

You could try something like this (/etc/network/interfaces):

auto eth1
iface eth1 inet static
    address 192.168.0.203
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    up ip route add default via 192.168.0.201 dev eth1 metric 100 
    up ip route add default via 192.168.0.202 dev eth1 metric 200 

Source: https://serverfault.com/questions/222628/etc-interfaces-file-for-multiple-gateways-same-network-linux

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .