Skip to main content
francesco73
New Member
July 7, 2016
Solved

ADDITIONAL ISP on Fortigate 100D

  • July 7, 2016
  • 9 replies
  • 12087 views

I need to add a new Isp on Wan 2 and then i would that clients use Wan2 to surf the web but servers and services (exchange server,web server etc etc)  keep on use Wan1.

It's enough to:

-set the network interface for wan2

-add a static route for wan2

-change the policies internal---->wan1 and set the outgoing interface to wan2 

 

??

Thanks for your help

Francesco

    Best answer by kallbrandt

    Great that it is working for you.

     

    No, you can not use an address range unfortunately. It isn't needed usually, since routing is the passing of traffic between different networks.

     

    This is also one of the many reasons you really should keep users and servers on different VLANs and subnets.

     

    First thing that comes to mind is to move the users to another subnet. If they are DHCP clients that is an easy thing to setup in the firewall.

     

    If that isn't possible, you can try to be creative with your own subnetting in the policy route.

     

    Something like this:

    Write policy routes that send these nets out via wan2.

    192.168.1.96/27

    192.168.1.127/26

    192.168.1.192/28

     

    That will cover all usable addresses between 1.97-206. Close enough for rock 'n roll?

    :)

     

     

     

    9 replies

    kallbrandt
    New Member
    July 7, 2016

    You'll need to use policy routing in order to make that work.

     

    Add the WAN2 interface with the new ISP. Add a default route to it, with distance 10 and priority 10 (if your wan1 default route is distance 10 and priority 0 - Use the same distance as WAN1, but LOWER priority on WAN2 (higher number).)

     

    Create the firewall policies for your user networks that sends them out on WAN2 with NAT etc etc.

     

    Create policy routes for your user networks that STOP policy routing when the destination is:

    192.168.0.0/16

    172.16.0.0/12

    10.0.0.0/8

     

    This is needed because otherwise the clients shouldn't be able to reach anything internal - They are forced out on WAN2 by the rule below here. It is important that these rules that stop policy routing is on top of the ruleset, BEFORE the rule that does the actual policy routing.

     

    Create policy routes for your user networks that forwards the traffic to destination network 0.0.0.0/0 -> WAN2, do not specify gateway address, use 0.0.0.0.

     

    Configure link monitors for wan1 and wan2 in cli that pings something out on the internet that's always up, like Google's A/B-DNS:

     

    (Set the interval/timeout/failtime/recoverytime to your liking, value is in seconds)

     

    configure system link-monitor

    edit monitor-wan1

    set srcintf wan1

    set server 8.8.8.8

    set protocol ping

    set gateway-ip x.x.x.x (your gateway on wan1)

    set source-ip x.x.x.x (your wan1 IP)

    set interval 5

    set timeout 5

    set failtime 5

    set recoverytime 5

    set update-static-route enable

    set status enable

    next

    edit monitor-wan2

    set srcintf wan2

    etc etc... Do the rest the same as the monitor for wan1...

    next

    end

     

     

    Now, if you want the user networks to be able to fall over to WAN1 if WAN2 fails, create rules pointing them to WAN1 also. Or create a zone (I would call it "INTERNET"...) with both wan1 and wan2 in it, and point all traffic going out to that zone. The policy routing and the regular routing table will take care of the traffic, everything that isn't policy routed will go out on wan1 according to the routing table. The link monitor will update the routing table when a link fails and remove all routes to the monitored interface.

     

    So, if WAN1 fails, the default route is removed, and the traffic will hit the next default route, and use that.

    Same with the traffic that you policy routed out on WAN2; as long as you only specify interface, and not gateway address, the traffic will go out on the interface that has the default route wich is WAN1 if WAN2 fails.

     

    :)

     

    Justlinux
    New Member
    July 7, 2016

    General routing uses the destination address as the decision (and both the clients and servers will likely be accessing similar Internet resources) so a typical default route will send all traffic out a single interface. You will need to use policy-based routing which can route based on information other than destination - and in this case you want a decision based on source address. You will need two "source address" policy routes, one for the clients pointing toward the WAN2 ISP and one for the servers pointing toward the WAN1 ISP.

    francesco73
    New Member
    July 8, 2016

    So I need to Add the first policy route for all the Lan Ip towards WAN2 Source Address= 192.168.1.0/24 and then a specific policy route for each server i want to redirect towards WAN 1. Is this correct?

    kallbrandt
    New Member
    July 9, 2016

    No, policy routing is for everything that you DON'T want to use your regular routing table.

     

    Let your servers use your regular default route via wan1. You don't have to change anything for them. They will use wan1.

     

    Then force your clients out on wan2 with policy routing.

     

    Read my earlier post for the details.

     

     

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.