SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=header): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_topmenu.inc' line 5

ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007891ClearCenterapp-dynamic-dns - Dynamic DNSpublic2016-03-30 06:522016-03-30 08:13
Reporterbchambers 
Assigned Tobchambers 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version7.2.0 Updates 
Target VersionFixed in Version 
Summary0007891: Wrong IP may update on MultiWAN
DescriptionIf a multiWAN system with a preference selected for a particular interface is assigned private IP's, Dynamic DNS ip referrer may use any route to fetch the address, and not end up using the preferred interface.

A proposed fix would be to modify the following files:

/usr/clearos/apps/clearcenter/libraries/Web_Service.php

public function request($action, $postfields = "")

to

public function request($action, $postfields = "", $bind = NULL)

add to "Set main curl options" section:

if ($bind != NULL)
   curl_setopt($ch, CURLOPT_INTERFACE, $bind);

/usr/clearos/apps/dynamic_dns/libraries/DNS_Update.php

Line 229

$ip = $ip_referrer->get();

to

$ip = $ip_referrer->get($ip);

/usr/clearos/apps/dynamic_dns/libraries/IP_Referrer.php

public function get()
    {
        $payload = $this->request('getip', NULL);

        return $payload;
    }

to

public function get($bind_ip)
    {
        $payload = $this->request('getip', NULL, $bind_ip);

        return $payload;
    }
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002961)
user2
2016-03-30 08:13

Note: IP referrer lookups are not supported in Multi-WAN. Syswatch doesn't track IP referrers in MultiWAN, so it will never detect a changed IP. In syswatch:

    if ($numwans >= 2) {
        $config{is_multiwan} = $STATE_ENABLED;
        $config{use_get_ip} = $STATE_DISABLED;
        LogMsg("info", "config", "IP referrer disabled in multi-WAN\n");
    }

Keep in mind, Dynamic DNS updates still happen on boot and manually.

If we want to add support for IP referrers in MultiWAN mode, this policy would need to change. I can't think of a good reason why this policy was put in place (?) ... but it's definitely intentional.

- Issue History
Date Modified Username Field Change
2016-03-30 06:52 bchambers New Issue
2016-03-30 06:52 bchambers Status new => assigned
2016-03-30 06:52 bchambers Assigned To => bchambers
2016-03-30 06:57 bchambers Description Updated View Revisions
2016-03-30 08:13 user2 Note Added: 0002961

SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=footer): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_footer.inc' line 7