EFW Support

Development => Contribute Your Customisations & Modifications => Topic started by: euser4life on Friday 31 August 2007, 07:53:54 am



Title: Dual Wan Support
Post by: euser4life on Friday 31 August 2007, 07:53:54 am
This is one that I found going through the mailinglist.  I see this asked all the time so thought I'd post it.  (Note - I have not tested this)  Thanks goes to Dayne.


1) First you will need to access the console via ssh.
 
2)Then cp /var/efw/uplinks/main /var/efw/uplinks/link2
 
3)Modify the /var/efw/uplinks/link2/settings file in vi to reflect the other ISP connection. Make sure to change the RTABLE=200 to RTABLE=201.   
 
"This value is used as name of the link specific routing table, as priority within routing rule table (ip rule) and as mark in the iptables mangle table (iptables -t mangle -vnL)" - Peter Endian
 
Some people have reported issues with portforwarding.   
 
"if you use portforwarding, keep in mind that if you have multiple uplinks you have different uplink ip addresses"   


----- Here is another post towards the subject-------

LOAD BALANCING WITH 2 OR MORE RED NICS
*************************************

The objective of this small howto is to make a load balance of the internet traffic between 2 or more red nics with STATIC IP (is a must)
1. Configure 1 red nic using the web interface
2. Open a ssh connexion as root to the firewall and enter to the folder /var/efw/uplinks ("cd /var/efw/uplinks")
3. run the command "cp -p -r ./main ./link2 (if you have more red nics repeat this step but with ./link3 ./link4 ./link... you get the point)
4. Enter to each one of the copied folders and edit all of the parameter in the file "settings" except DEFAULT_GATEWAY, leave that one blank
5. Do the previous step with the folder main ( /var/efw/uplinks/main)
6. Recheck that all parameter for all of your links are set OK, and that all DEFAULT_GATEWAY fields are blank (is a must or else it wont balance the traffic)
7. Enter the directory /var/efw/inithooks ("/var/efw/inithooks")
8. add to the files start.local updatered.active.local updatered.inactive.local updatered.local  and updatewizard.local

  route del default
  route del default
  route del default
  route del default
  ip route add default equalize scope global \
                          nexthop via <gateway link1> dev <iface link1> weight 1 \
                          nexthop via <gateway link2> dev <iface link2> weight 1 \
                          nexthop via <gateway link3> dev <iface link3> weight 1 \
                          .
                          .
                          .
  NOTE: remove the " \ " in the last line
  NOTE: i modify ALL those files because i do not know witch one endian use to generate the routing tables.

9. Restart your endian firewall
10. Wait 5 minutes or so an log to the firewall
11. Check your routes with the command "ip route", it shoud show you all the gateways that are using in a round robin balance for the packets that goes out from your network to the internet.
12. HAVE FUN