Reply
New Member
Posts: 4
Registered: ‎12-03-2018
Kudos: 2

Dual WAN routing traffic to a particular WAN

Hi all,

 

I recently purchased and configured a Ubiquiti USG Security Gateway 3P and so far the device has worked wonders with the two WAN networks (one PPPoE and the other 4G Mobile) with load balancing enabled. However our primary network is quite slow so I would like to make some changes to how the dual WANs are configured. 

 

WAN1 (PPPoE) should be the primary network where all traffic goes out unless otherwise specified. 

 

WAN2 (4G Mobile) should handle all traffic (in & out) for on particular machine, lets say 192.168.1.100.

 

Does anybody know how I can set this up?

 

Regards.

New Member
Posts: 4
Registered: ‎12-03-2018
Kudos: 2

Re: Dual WAN routing traffic to a particular WAN

Bump

New Member
Posts: 18
Registered: ‎01-25-2016
Kudos: 3

Re: Dual WAN routing traffic to a particular WAN

[ Edited ]

I have this going on my USG3P.  You will have to SSH into the USG and issue commands.  Here are the commands I enter to get a specific machine to use a specific connection.  

I have the same setup as you.  PPPoE on WAN1 and DHCP LTE connection on WAN2.  

 

configure
set protocols static table 5 route 0.0.0.0/0 next-hop X.X.X.X
set firewall modify LOAD_BALANCE rule 2500 action modify
set firewall modify LOAD_BALANCE rule 2500 modify table 5
set firewall modify LOAD_BALANCE rule 2500 source address 192.168.0.10
set firewall modify LOAD_BALANCE rule 2500 protocol all
commit
exit

X.X.X.X is the gateway IP of my PPPoE connection on WAN1.

192.168.0.10 is the static IP I set to the machine I want to always use WAN1.

 

These SSH commands will only work until your USG provisions again.  If you want the setting to persist after provisioning, you will need to create a config.gateway.json file.  This where I stop know wtf Im doing.  I have not been able to figure out how to properly create a config.gateway.json yet.  Plenty of posts on this subject but the more I read, the more confused I get! 

Hopefully this gets you started.  Let me know if you figure out anything further!

 

https://help.ubnt.com/hc/en-us/articles/360005460813-UniFi-USG-Advanced-Policy-Based-Routing-

New Member
Posts: 12
Registered: ‎11-10-2016

Re: Dual WAN routing traffic to a particular WAN

I'm trying to set by destination the WAN not by the source

Ron@Gateway# set protocols static table 5 route 73.0.0.0/8 next-hop 73.56.88.1 distance 1
[edit]
Ron@Gateway# set firewall modify LOAD_BALANCE rule 2500 action modify
[edit]
Ron@Gateway# set firewall modify LOAD_BALANCE rule 2500 modify table 5
[edit]
Ron@Gateway# set firewall modify LOAD_BALANCE rule 2500 source address 192.168.0.0/24
[edit]
Ron@Gateway# set firewall modify LOAD_BALANCE rule 2500 protocol all
[edit]
Ron@Gateway# commit
[ firewall modify LOAD_BALANCE ]
Error: [sudo /sbin/iptables-restore -n -v 2> /tmp/iptables.out] = 512
Iptables restore OK

Reply