Is it possible to choose gateway client side?

Ameel

New Around Here
Hi,

I have the following working configuration on my router:
Dual WAN
2x openvpn client

Without resorting to policy-based routing on router side, is there a way to change gateways 'on-the-fly' on the client side?

I asked a similar question before, but my preliminary thoughts are around setting up 'proxies' on the router that allows connection through the different gateways. Is that possible? Any thoughts/ideas/suggestions are welcome.
 

dosborne

Very Senior Member
Not sure I fully get your question, but when I had multiple ISP gateways set up, I simply changed my "Default Gateway" setting on the client device to pick one or the other. Does that help in your situation?
 

Ameel

New Around Here
Not sure I fully get your question, but when I had multiple ISP gateways set up, I simply changed my "Default Gateway" setting on the client device to pick one or the other. Does that help in your situation?
Can you please elaborate?

Do you mean that you configure the client IPv4 settings to select the IP for the gateway you want to connect to?
 

dosborne

Very Senior Member
Do you mean that you configure the client IPv4 settings to select the IP for the gateway you want to connect to?
Yes.

On the client I set the default gateway to point to one router (192.168.0.1 for example) for ISP #1 or to the second router (192.168.0.2 for example) for ISP #2

In this scenario I had both routers in the same subnet but obviously with different UP addresses.
 

Ameel

New Around Here
Yes.

On the client I set the default gateway to point to one router (192.168.0.1 for example) for ISP #1 or to the second router (192.168.0.2 for example) for ISP #2

In this scenario I had both routers in the same subnet but obviously with different UP addresses.
Thanks for that. I just gave that a try as follows:

Router config
br0
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0

tun11
inet addr:IP1 P-t-P:XXX Mask:255.255.255.0

vlan2
inet addr:IP2 Bcast:XXX Mask:255.255.252.0

vlan3
inet addr:IP3 Bcast:XXX Mask:255.255.255.0

Dual WAN config, setting is on 'load balancing' with some clients directed through 2nd gateway:
Default Gateway = IP3 on vlan3
Second Gateway = IP2 on vlan2

VPN is on tun11, VPN has policy rules with some clients directed through VPN

Test
On client1, DHCP connects through Default Gateway.
I change IPv4 to static and type gateway as IP2 for Second Gateway, but 'myip' still reports Default Gateway IP
I change IPv4 to static and type gateway as IP3 for VPN, but 'myip' still reports Default Gateway IP

On client2, DHCP connects through VPN based on VPN policy rules.
I change IPv4 to static and type gateway as IP2 for Second Gateway, but 'myip' still reports VPN IP
I change IPv4 to static and type gateway as IP1 for Default Gateway, but 'myip' still reports VPN IP


Any ideas? What i'm doing wrong
 

dosborne

Very Senior Member
You make your scenario more complex with each post :)

I would suspect that the automated selected (load balancing) is "correcting" the manual setting of the DGW. Could also be the VPN rules you've implemented. My option works for a simple scenario with nothing automatic running. YMMV
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top