Project

General

Profile

Actions

Bug #7380

closed

WAN DHCP Gateway Outside of Subnet Causing Route Issues

Added by Doran Smestad over 7 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
03/12/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4
Affected Architecture:

Description

When deploying PFSense in OVH's public cloud, they assign a IPv4 address via DHCP in a /32 subnet. Naturally, with such a captive subnet, the default gateway will reside outside of the subnet. This causes problems with the /usr/local/sbin/pfSense-dhclient-script.

As it is currently written, the script will attempt to add the default route via: $ROUTE add default $router (see https://github.com/pfsense/pfsense/blob/master/src/usr/local/sbin/pfSense-dhclient-script#L232). Since the gateway is outside of the subnet, there is no route to reach said gateway, causing the route assignment to fail and thus no connectivity.

I fixed this in my copy of the 2.4 PFSense March 11 nightly build by adding a line to add a host route to the gateway on the particular interface. See my branch here: https://github.com/doransmestad/pfsense/blob/ds-dhcp-gw-out-of-subnet/src/usr/local/sbin/pfSense-dhclient-script#L240.

I opened this bug on Redmine to provide some tracking of the issue, and this being my first experience contributing to PFSense, I wasn't sure if you all would be receptive to a pull request out of nowhere. Please let me know how you would like me to proceed.

Thanks!

Actions

Also available in: Atom PDF