// CFG: EXTERNAL-IP
$cfg->setConfigEntry('external_ip', '');
+// CFG: ALLOW-PUBLISH-INTERNAL-IP
+$cfg->setConfigEntry('allow_publish_internal_ip', 'N');
+
// CFG: NODE-STATUS
$cfg->setConfigEntry('node_status', 'invalid');
* @return $ip The determined external ip of this node
*/
public static function determineOwnInternalIp () {
- // Is the external_ip config entry set?
- if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_ip') != '') {
+ // Is the internal_ip config entry set?
+ if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('allow_publish_internal_ip') == 'N') {
+ // Not allowed to publish internal IP, so use external
+ $ip = self::determineOwnExternalIp();
+ } elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_ip') != '') {
// Use it as internal ip
$ip = FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_ip');
} else {