Netgate Store

Author Topic: Multi WAN Separating Port Specific Protocols  (Read 137 times)

0 Members and 1 Guest are viewing this topic.

Offline pixfour

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Multi WAN Separating Port Specific Protocols
« on: February 06, 2018, 11:20:23 pm »
Hello,

I have two ISP and I would like to separate traffics using specific ports. For example:
WAN1 = All ports can use this connection
WAN2 = Only 80 and 443 can use this connection


Thank You very much.

Offline gazoo

  • Jr. Member
  • **
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: Multi WAN Separating Port Specific Protocols
« Reply #1 on: February 09, 2018, 02:15:18 pm »
Go to Firewall rules under initiating interface. Then put in add a firewall rule with following:

Interface: current interface that has, let's call it LAN1
Protocol: TCP
Source: any, or you could specify LAN1 addresses, or LAN1 network
Destination: any IP address, going to HTTP, port 80 to HTTP, port 80

Here's the trick now, go to Extra Options by clicking it. Some new info will pop down
Then go to Gateway and choose WAN2 for the pull down.

This is called policy routing. It's routing by rule, vs. routing by routes. This is not normally newbie recommended because you can really mess things up, but as long as you know what you're getting into, and how to undo it you should be ok.

You'll have to do this for 443 (SSL). No put those two high up in the list of rules.

Next, do one more rule near bottom and do the same thing but do any, any, and on extra options choose wan1 as the gateway.

I hope I explained that right, and please others jump in if I'm telling him something completely wrong.

I've used this in that past to route to different VPNs from certain devices.

thanks