Notes |
|
(0001359)
|
user2
|
2015-01-30 02:16
|
|
The system was in standalone mode. When a ClearOS system is configured as a standalone server on the LAN, it assumes that it is being configured as the LAN's DHCP server and suggests the default gateway:
if (($mode === Network::MODE_STANDALONE) || ($mode === Network::MODE_TRUSTED_STANDALONE))
$subnet['gateway'] = $defroute;
else
$subnet['gateway'] = $ip;
That's the correct default for an "External" network interface on a system in "Standalone" mode. In the case where a user has the following setup, it's difficult to suggest a default for eth1:
Mode: standalone
eth0 - External
eth1 - LAN
Right now, DHCP suggests the default gateway on eth0 for the eth1 LAN. Perhaps leaving it blank is best? Or should it suggest the eth1 LAN IP and assume the "standalone" mode is just a temporary thing. |
|
|
(0001408)
|
dloper
|
2015-04-03 09:24
|
|
The gateway that should be suggested is the IP address associated to the NIC that is bound to the subnet is for if the server is in gateway mode (trusted gateway and regular gateway). For example. enp0s8 should suggest the IP address for:
ifconfig enp0s8 | grep "inet " | awk '{ $print $2 }'
If a result is present, then it should be suggested. If a result is NOT present, it should be blank.
If it is a standalone server, the gateway that is suggested would be the gateway (and not the IP) that exists on the 'External' interface.
At present, the gateway of the NON-ASSOCIATED address is being returned. |
|
|
(0001409)
|
user2
|
2015-04-05 08:54
|
|
Please send the code changes that detail what you are trying to accomplish. Your feedback states:
> If it is a standalone server, the gateway that is suggested would be the gateway
> (and not the IP) that exists on the 'External' interface.
That's what the code above does. In standalone mode, the default route is used. In gateway mode, the LAN IP is used. How would you like this changed? |
|
|
(0008181)
|
user2
|
2018-10-10 08:03
|
|
The gateway will now be the local ClearOS IP even when in standalone mode (i.e. we're telling clients to route through ClearOS even though ClearOS is not routing!). |
|
|
(0008191)
|
user2
|
2018-10-10 08:27
|
|
Scratch that. If the system is in standalone mode, the default gateway will be used if and only if that default gateway is on the interfaces local network.
if (($mode === Network::MODE_STANDALONE) || ($mode === Network::MODE_TRUSTED_STANDALONE)) {
$network_address = Network_Utils::get_network_address($ip, $netmask);
$network_prefix = Network_Utils::get_prefix($netmask);
if (Network_Utils::ip_on_network($defroute, "$network_address/$network_prefix"))
$subnet['gateway'] = $defroute;
else
$subnet['gateway'] = '';
} else {
$subnet['gateway'] = $ip;
} |
|