Dual WAN NIC setup

Discussion in 'Installation/Configuration' started by awado, Feb 23, 2023.

  1. awado

    awado New Member

    Hello.

    what is the recommended way to setup ISPConfig with two WAN connections? Each of them has its own NIC (eth0 -> gateway1 and eth1 -> gateway2) and network (10.0.0.10/24 and 192.168.0.10/24). But only one WAN connection (10.0.0.10) has reverse DNS. The other one (192.168.0.10) is a pretty fast fibre DSL line, without static WAN IPv4, but DynDNS. To deliver mails, I have to use the slower one, because of the reverse DNS record. To serve websites and WebDAV shares, I have to use the faster one.

    Is it sufficient to set routing metrics in /etc/networking/interfaces to get outbound smtp traffic on the slow line and everything else on the fast one? For technical reasons I cannot route both traffic over one gateway. I have to use two separate gateways. How does the webserver answer queries for domains?

    Thanks for any hints.
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I would setup two ISPConfig servers, one for mail with fixed public IP and one for others.
     
    remkoh likes this.
  3. remkoh

    remkoh Active Member HowtoForge Supporter

    Normally a server has only one gateway configured.
    Unless you add a layer for failover or loadbalancing of some sort.

    I don't think just metrics will do the trick for you as you can't link a service to it as far as I know.
    Metrics more or less only prioritize the available gateways.

    The only thing I can think of you could try is at least making sure your mail services listen on 10.0.0.10 only.
    But I'm not sure return traffic will then use the same route out.
     
    awado and ahrasis like this.
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    Just set "smtp_bind_address" in master.cf for "smtp" to the interface address of the slow line.

    Like this:

    Code:
    smtp      unix  -       -       y       -       -       smtp
      -o smtp_bind_address=10.0.0.1
     
    awado likes this.
  5. awado

    awado New Member

    Thanks pyte. I stumbled over this directive in the docs, but could not figure out, how to set that. I'll give it a try.
     
  6. awado

    awado New Member

    Not working. Outgoing mail is still using the wrong address. Are there any overrides with mail routing via ISPConfig's multi server configs or multi client configs?
     
  7. vk3heg

    vk3heg Member

    In postfix's main.cf:
    inet_interfaces = eth2
     

Share This Page