Skip to contentSkip to conversation

load balancing iptables

DISCUSSION Sjaak Nabuurs 1 participant 1 message Oct 30, 2003

lore
Share & tools
lore
#0 lore raw

Hi I'm new to iptables.

Does anyone have a good iptables solution for this :

eth0 192.168.1.25 is the intranet eth1-4 are dsl lines
eth5 is an old dsl line

Wat's a good way to push all the traffic to eth5

I've everything running but no ssh is possible trough this box

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
xxx.xxx.xxx.0   0.0.0.0         255.255.255.128 U     0      0        0 eth5
10.0.4.0        0.0.0.0         255.255.255.0   U     0      0        0 eth4
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 eth2
10.0.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth3
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         10.0.2.1        0.0.0.0         UG    0      0        0 eth2

[root@router root]# ip route show 212.104.194.0/25 dev eth5 scope link 10.0.4.0/24 dev eth4 scope link 10.0.1.0/24 dev eth1 scope link 192.168.1.0/24 dev eth0 scope link 10.0.2.0/24 dev eth2 scope link 10.0.3.0/24 dev eth3 scope link 127.0.0.0/8 dev lo scope link default equalize

        nexthop via 10.0.4.1  dev eth4 weight 1
        nexthop via 10.0.1.1  dev eth1 weight 1
        nexthop via 10.0.2.1  dev eth2 weight 1
        nexthop via 10.0.3.1  dev eth3 weight 1

nexthop via xxx.xxx.xxx.xxx dev eth5 weight 1

[root@router root]# ip address show 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:26:87:6d:bb brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.25/24 brd 192.168.1.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:26:87:6c:9d brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.2/24 brd 10.0.1.255 scope global eth1
4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:26:87:6e:a0 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.2/24 brd 10.0.2.255 scope global eth2
5: eth3: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:26:87:6d:17 brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.2/24 brd 10.0.3.255 scope global eth3
6: eth4: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:26:87:6c:5f brd ff:ff:ff:ff:ff:ff
    inet 10.0.4.2/24 brd 10.0.4.255 scope global eth4

7: eth5: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:c0:26:87:67:ca brd ff:ff:ff:ff:ff:ff inet xxx.xxx.xxx.xx/25 brd xxx.xxx.xxx.xxx scope global eth5
8: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100

    link/ether 00:50:70:22:cb:57 brd ff:ff:ff:ff:ff:ff

Met vriendelijke groeten,

Sjaak Nabuurs

|Systeembeheerder.
|VSM Automatisering BV
|
|--->www.vsm-hosting.nl
|--->[email protected]
|--->ICQ 54452648
|--->Tel 0485-478040