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

Conversation

@luckman212
Copy link
Contributor

Rebase/update of my old PR #3609 -- trying again!

This commit adds a feature to allow you to optionally prevent gateways from being elected 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 it to be excluded from the default gateway selection process
-indicate this setting (as an icon) in System > Routing > Gateways
-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
-setting a gateway as default on the edit page automatically toggles/hides this option, as having both enabled would not be sane

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
Copy link
Contributor Author

Didn't want to add too much to this PR so close to 2.4 but, here's a closely-related commit 3bbcaef that also adds the ability to disable notifications (smtp, growl) on a per-gateway basis.

Since fixup_default_gateway() gets called frequently, the logs were getting spammed. This change makes it only log the debug events if the global debug flag is set.
@jim-p
Copy link
Contributor

jim-p commented Sep 25, 2017

@luckman212 - It's far too late for a change like this to make 2.4. That said, after 2.4.0 we're planning on using the method in PR #3781 instead for a more complete way to control default gateway switching. It's a more intuitive and comprehensive method of managing the default switching behavior.

@luckman212
Copy link
Contributor Author

Original PR was causing too much log spam. 6d2f615 cleans that up.

@luckman212
Copy link
Contributor Author

luckman212 commented Sep 25, 2017

@jim-p I was talking to @PiBa-NL on IRC and he said that his PR was still a ways out. This one is fairly simple, so I thought it might squeak through. I understand if 2.4.0 is off the table, but should I retarget master, or just kill this altogether? PiBa's patch could be a long ways off and this is still useful as-is.

@PiBa-NL
Copy link
Contributor

PiBa-NL commented Sep 26, 2017

@luckman212 iirc i told my PR wasn't going to get into 2.4.0 as it was marked "post 2.4.0".. I do intend to get it into 2.4.1 shortly after 2.4release becomes available and the bigger pullrequests likely get handled again. And while it does need a little more work as it currently is, thats mostly the automatic configuration upgrade and removing of the old checkboxes..

your PR might have been merged into 2.4.0 if i didnt make a similar one.. im not sure, but i do hope that 2.4.1 will provide us both the flexibility we seek in this subject, until 2.4.1 release (or if your going to run beta's) you will have to patch your pfSense box with either your own patch, or mine if you really need this behavior..

in the mean time did do a few other pullrequests that i 'hoped' might still have made it into 2.4.0 and as such i havent finished the changes to #3781.. anyhow i hope my intentions are clear, sorry if i gave you a different idea before.. ill try and finish it before 2.4.0 gets released.. im getting the feeling that might happen really really soon.. (basically 2 issues left on redmine that need work.)

@luckman212
Copy link
Contributor Author

luckman212 commented Sep 26, 2017

@PiBa-NL Ok no problem, sounds good.

@jim-p no problem, I’ll use System Patches until 2.4.1, when hopefully PiBa’s patch will be good to go.

@luckman212 luckman212 changed the title Allow specific gateways to be excluded from default gatway switching Allow specific gateways to be excluded from default gateway switching Oct 20, 2017
@luckman212
Copy link
Contributor Author

In the meantime, I rebased and have a new unified patch that rolls the customizable default gw switching + independent email notification toggles together and merges clean with 2.4.2/master

commit: 01b57b4 for anyone who wants to use it until PiBa's patch is ready.

@rbgarga
Copy link
Member

rbgarga commented Nov 1, 2017

@luckman212 can you please send it against branch master?

@luckman212
Copy link
Contributor Author

Sure, I thought we were waiting for PiBa's patch... but I already had a commit targeting master so here's a PR for that: #3861

@rbgarga
Copy link
Member

rbgarga commented Nov 2, 2017

Superseded by #3861

@rbgarga rbgarga closed this Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants