Allow adding gateways outside of interface subnet
Gateways outside of the interface's IP subnet, on Ethernet links, cannot be added under normal circumstances as it's not really a valid config and FreeBSD won't add the default gateway as normal, and will not issue ARP requests for IPs outside of directly connected subnets. The work around to add such a gateway is to run:
# route add -net gatewayip/32 -iface em0 -cloning # route add default gatewayip
Updated by Franck Bourdonnec over 10 years ago
well, OVH big big french provider is also using this king of setup
A well english detailled big page explain all here
Please implement your two lines fix asap when you detect the strange configuration !
Issue a warning if you want, but don't forbide it.
Updated by Dédé D over 8 years ago
I felt in the same trouble, and I the idea I have found to survive reboot is using the ShellCmd package : https://doc.pfsense.org/index.php/Executing_commands_at_boot_time
I added the workaround lines in comment #6, and it works (OVH Hyper-V 2008 guest VM).
Updated by Chris Buechler over 6 years ago
- Category set to Gateways
- Status changed from New to Feedback
It works, went ahead and merged it. The deletion doesn't happen correctly, added a comment to that PR, hopefully PiBa can follow up with a fix there.
Leaving for verification again once it's in a snapshot.