Koozali.org: home of the SME Server

Dual WAN failover in server-gateway mode?

Offline smiit

  • **
  • 41
  • +0/-0
Dual WAN failover in server-gateway mode?
« on: February 09, 2016, 02:47:36 PM »
Problem: Frequent ISP outages affecting company need for 24/7 internet uptime

Environment: SME 9.1 in server-gateway mode hosting email and website with external static IP via cable modem (1 of 5 usable addresses in .248 netmask)

There have been several discussions about this over the years and a feature request for > 1 WAN interface but I'm curious about current recommendations and working configurations for Dual WAN failover for SME servers.

How do people here accomplish ISP redundancy and minimize downtime for their companies and clients?  Server-only mode behind pfsense or a dual wan router?  Other solutions?

guest22

Re: Dual WAN failover in server-gateway mode?
« Reply #1 on: February 09, 2016, 04:09:23 PM »
SME Server currently does not facilitate WAN failover. A dual WAN router would be the way to go at this point in time.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #2 on: February 10, 2016, 02:12:51 AM »
smiit

Otherwise get a better ISP with reliable connection.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #3 on: February 10, 2016, 12:56:44 PM »
I've done this two different ways.

The easy way is to get a dual wan router and switch the SME server to server-only mode - there a (tiny) bit more info here: https://forums.contribs.org/index.php/topic,47556.msg234899.html#msg234899

The difficult way, which requires a script or manual intervention if the primary wan connection fails, is to put a SME in server-gateway mode on each ISP and play with the proxypass, internal mail server, and port forwarding settings until you're happy: https://forums.contribs.org/index.php/topic,47556.msg234897.html#msg234897

The second method would allow you to have one SME setup as a 'warm spare' for the other if Affa still works...

Offline smiit

  • **
  • 41
  • +0/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #4 on: February 10, 2016, 03:13:10 PM »
I've done this two different ways.

The easy way is to get a dual wan router and switch the SME server to server-only mode - there a (tiny) bit more info here: https://forums.contribs.org/index.php/topic,47556.msg234899.html#msg234899

The difficult way, which requires a script or manual intervention if the primary wan connection fails, is to put a SME in server-gateway mode on each ISP and play with the proxypass, internal mail server, and port forwarding settings until you're happy: https://forums.contribs.org/index.php/topic,47556.msg234897.html#msg234897

The second method would allow you to have one SME setup as a 'warm spare' for the other if Affa still works...

Thank you for the information.

Yes, I've avoided server-only behind a dual wan router since posts over the years have stated that Email functionality/filtering works best in server-gateway mode with a direct connection between SME and modem.  And, as we know, SME just works so well out of the box as server-gateway.

I'll experiment with your 2nd approach.  I found info suggesting Win 7 clients on the LAN can be assigned a 2nd gateway route with a higher metric that should redirect traffic out the 2nd SME server-gateway if the primary gateway WAN route is down:

http://blog.palehorse.net/2009/08/24/using-windows-7-with-multiple-gateways-and-dhcp/

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #5 on: February 11, 2016, 12:48:52 PM »
... I found info suggesting Win 7 clients on the LAN can be assigned a 2nd gateway route with a higher metric that should redirect traffic out the 2nd SME server-gateway if the primary gateway WAN route is down:


I have a vague memory that using multiple gateway IPs on my workstations didn't work - the primary route was not going "down" as far as the workstations could tell -- it just stopped working (if you see what I mean).  Since the primary SME continued to accept packets from workstations the workstations never used the secondary route.  But this was using Windows XP...

When the primary WAN went down I would ssh into the secondary SME, ssh from there to the primary SME, and do something to send traffic over to the secondary SME. I can't remember if I was manually setting a default route or if I was configuring the secondary SME as an upstream proxy for the first sme.

Offline craig

  • 10
  • +0/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #6 on: February 12, 2016, 10:23:12 AM »
I've had good success with Draytek routers and multi-WAN links including USB 3G dongles. A few vendors offer this functionality nowadays.

The requirements that I work with don't usually need restricted Internet so the SME Server is typically in server only mode sat behind the router. At one site the firewall rules were changed to only allow the SME Server to access the Internet, and then the proxy enabled on the SME Server and SARG reports ran from there.

Hope this helps.

Offline ReetP

  • *
  • 3,742
  • +5/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #7 on: February 15, 2016, 06:04:24 PM »
I have a couple of sites with SME boxes in server only sitting behind a 4 port Draytek 3300 WAN router. I just forward the required ports and nothing more. Usually the ssh port (whatever, keys only), smtp (25), ssmtp (465), imaps (993), https (443) and possibly http (80)

On one I have a proxy running with SARG with browers all pointed at it just to keep an eye on surfing habits. Has worked well for me for years.

As an aside what I have done with a couple of VMs on my cloud server is run them in gateway server with a 'dummy' internal adaptor to help with firewalling where there is no router/firewall in front of it.

As long as you have firewalling SOMEWHERE you should be OK.

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline zatnikatel

  • ****
  • 190
  • +0/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #8 on: February 17, 2016, 01:45:57 AM »
just my 2 cents i use to have a router years ago that had a fall over to a dailup modem the the wan failed it would switch to the dail but one good thing you did not have to change the setting on the clients it was auto done in the router so same dhcp same ipaddress but never tested it with mail but web and https and all the normal stuff worked the same so the port forwarding was still the same inside the router

no days there should be a modem router that does the same with wireless fall and the router does the changes

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: Dual WAN failover in server-gateway mode?
« Reply #9 on: February 17, 2016, 03:37:54 PM »
I have a Dratec and played a bit with the 3g dongle fall over. While that works quite well for outgoing traffic, you quickly run into trouble for incoming connection like SMTP as you have the issue of DNS changeover. On top of that not all 3g data connections allow for public IP addresses so you have to watch out for that too.
Adelaide - Australia

Offline ReetP

  • *
  • 3,742
  • +5/-0
Re: Dual WAN failover in server-gateway mode?
« Reply #10 on: February 17, 2016, 04:03:37 PM »
I have a Dratec and played a bit with the 3g dongle fall over. While that works quite well for outgoing traffic, you quickly run into trouble for incoming connection like SMTP as you have the issue of DNS changeover. On top of that not all 3g data connections allow for public IP addresses so you have to watch out for that too.

Yup - even worse when they are double natted like the a lot of telcos do now.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation