Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.