这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@luckman212
Copy link
Contributor

@luckman212 luckman212 commented Mar 4, 2017

This commit adds a feature to allow you to optionally prevent gateways from being chosen as default during Gateway Switching operations in a multi-WAN environment when the "Enable default gateway switching" option is enabled. Some possible use cases:

  • non-internet-facing gateways
  • metered connections
  • VPN gateways

This only controls the default gateway of the firewall itself; it does not change the behavior of Policy Based Routing.

Changes/new features

  • adds a no_defgw_switch flag to gateway config that will cause a gateway to be excluded from the default gw selection process
  • indicate this setting (as an icon) in the System > Gateway list view
  • updated help text for Default gateway switching in System > Advanced > Misc to better describe the usage of that feature
  • adds some debug logging for gw change events
  • selecting a gw as the default gw automatically hides this option, as having both enabled would not make sense (input validation automatically disables the no_defgw_switch bool when saving a gateway you've marked as default from the GUI)

Files changed:
/etc/inc/gwlb.inc
/usr/local/www/system_advanced_misc.php
/usr/local/www/system_gateways.php
/usr/local/www/system_gateways_edit.php

This commit adds a feature to allow you to optionally prevent gateways from being chosen as default during Gateway Switching operations in a multi-WAN environment when the "Enable default gateway switching" option is enabled.

Changes/new features
- adds a `no_defgw_switch` flag to gateway config that will cause a gateway to be excluded from the defgw selection process
- indicate this setting (as an icon) in the System > Gateway list view
- updated help text for Default gateway switching in System > Advanced > Misc to better describe the use of the function
- adds some debug logging for gw change events
- selecting a gw as the default gw automatically hides this option, as having the 2 both enabled does not make sense
- added input validation to automatically disable the no_defgw_switch bool when saving a gw as default from the GUI

Files changed:
/etc/inc/gwlb.inc
/usr/local/www/system_advanced_misc.php
/usr/local/www/system_gateways.php
/usr/local/www/system_gateways_edit.php
luckman212 added a commit to luckman212/pfsense that referenced this pull request Mar 30, 2017
luckman212 added a commit to luckman212/pfsense that referenced this pull request Mar 30, 2017
luckman212 added a commit to luckman212/pfsense that referenced this pull request Mar 30, 2017
@luckman212
Copy link
Contributor Author

I had to out of necessity create a version of this patch that applies cleanly to 2.3.3. In case anyone needs it and missed it in the commits, you can apply it from: 87d5f65

@rbgarga
Copy link
Member

rbgarga commented Apr 25, 2017

Can you please rebase your fork?

@luckman212
Copy link
Contributor Author

Yes, will do today. I'm sorry, I have been terribly backlogged last few weeks.

@PiBa-NL
Copy link
Contributor

PiBa-NL commented Jun 13, 2017

Made a different pullrequest which allows the same (disabling a gateway to become the default) and also setting priorities for the others, #3757
Perhaps you are willing to give it a test? Or comment on it.?

@sbeaver-netgate
Copy link
Contributor

Please resolve the conflict

@jim-p
Copy link
Contributor

jim-p commented Jul 13, 2017

A better implementation is in progress by @PiBa-NL, see #3781

@luckman212
Copy link
Contributor Author

I rebased/rewrote this - new PR is #3827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants