Hello everyone. i am new to the forum but not the area of linux and especially ubuntu. I am using ubuntu server 12.04 as a router in my office for 3 years now and i am happy. i have followed this tutorial (https://wiki.ubuntuusers.de/Alix/) to install over PXE to ALIX 2D13 the ubuntu 12.04. it works really nice. i would like to add a second wan connection and make use of both of them. i have moved places and it is really far away from the local exchange. so the dsl is really bad and unstable. I had to invest in a second one. i would like to loadbalance per connection and failover automatically. at the moment the setup has:
an ISP dsl router at IP 192.168.178.1 which does the NAT and the ALIX is connected to it.
/etc/network/interfaces:
auto lo iface lo inet loopback #WAN1 auto eth0 iface eth0 inet static address 192.168.178.79 netmask 255.255.255.0 gateway 192.168.178.1 dns-nameservers 8.8.8.8 #LAN auto eth1 iface eth1 inet static address 192.168.1.1 netmask 255.255.255.0 dns-nameservers 8.8.8.8
i have added
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT iptables -A FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
simply to NAT everything of my LAN to he WAN.
i have a second dsl connection that i would like to add it to eth2 and make use of it. the second router has an IP of 192.168.2.1/24. both routers are with dynamic IPs. i have tried the (https://wiki.ubuntuusers.de/Multiple_Uplink_Routing) without success. i have added at the /etc/network/interfaces the
#WAN2 auto eth2 iface eth2 inet static address 192.168.2.79 netmask 255.255.255.0 dns-nameservers 8.8.8.8
but i get access to the internet only from wan1. i would appreciate any help available on how to edit the system and make it work for both wan1 & 2. what else do i have to do? PLEASE?
Bearbeitet von rklm:
Formatierung. Bitte beachte Forum/Syntax!