PDA

View Full Version : Virtualizor - Connection from an INVALID IP / Your security HASH does not match...



Fli
07-24-2017, 02:01 PM
I found an error in Virtualizor / Stats
Virtualizor support helped to identify the relation to the WHMCS module, especially callback.php file at:

/home/myusername/public_html/modules/servers/virtualizor/callback.php

It contains:



// Any Admin User in WHMCS
$admin_user = "admin";

// The Hask Key in WHMCS
$hash_key = "callback_hash_from_Virtualizor/Configuration/Master_Settings";

// The Virtualizor Master IP
$connection_ip = "VirtualizorMasterServerIPHere";

...

// Is the request from a valid server ?
if($_SERVER['REMOTE_ADDR'] != $connection_ip){
virt_callback_die('<error>ERROR: Connection from an INVALID IP !</error>');
}

// Does the KEY MATCH ?
if($hash != $hash_key){
virt_callback_die('<error>ERROR: Your security HASH does not match</error>');
}

// Is it a valid
if(empty($vpsid) && $vpsid < 1){
virt_callback_die('<error>ERROR: Invalid VPSID</error>');


Make sure callback.php file variables match real virtualizor hash/IP..?

In my case it shown INVALID IP error because my WHMCS and virtualizor server domain is behind cloudflare. So to solve that i commented out the "ERROR: Connection from an INVALID IP !" line in callback.php by adding two back slashes at the line start.