Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peterupfold/pfsense-reset-routing-hack
Automatically "Apply Changes" to routing when using a default gateway on an interface that does not immediately come up.
https://github.com/peterupfold/pfsense-reset-routing-hack
pfsense
Last synced: 5 days ago
JSON representation
Automatically "Apply Changes" to routing when using a default gateway on an interface that does not immediately come up.
- Host: GitHub
- URL: https://github.com/peterupfold/pfsense-reset-routing-hack
- Owner: PeterUpfold
- License: apache-2.0
- Created: 2019-10-27T20:26:33.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-05T06:55:01.000Z (about 1 year ago)
- Last Synced: 2024-11-08T09:51:04.499Z (about 2 months ago)
- Topics: pfsense
- Language: PHP
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Reset Routing Hack
Publishing this hack in case it helps someone else. However, this is _ugly_, _works for me_, _no promises given_ territory. This probably should be
refactored into a PFSense package at some point, so that it might survive software updates etc. **You have been warned.**When your PFSense's own default gateway is configured to be on an OpenVPN interface which will not immediately come up following a reboot,
some services within PFSense not to function until you go to `system_gateways.php` (**System** > **Routing** > **Gateways** within the UI)
and press **Save**, followed by **Apply Changes** to reset that OpenVPN route as the default route everywhere.(This was particularly noticed when daily updates to the PFBlockerNG DNS block lists were not happening automatically.)
Instead of having to perform the aforementioned process in the UI, the shell script can be added into **/usr/local/etc/rc.d**. It calls the PHP file
which waits 3 minutes for the OpenVPN link to be up, then performs the same process as clicking **Apply Changes** within the GUI.## PFSense 2.5.0
Maybe also need to add static route to allow access to the VPN gateway at all in UI -- `/system_routes.php`
Also after a reboot of the static gateway, the VPN client has to be started again (via cron??) -- /etc/rc.openvpn
## Licence
Licensed under the Apache License version 2.0. See the `LICENSE` file.