[TUTORIAL] Allow Private DNS
09-09-2016, 08:48 AM
(This post was last modified: 09-10-2016, 06:13 AM by hrace009.)
If you run sentora only for local server with private IP Address e.g: 192.168.0.15 or 172.16.0.50
Open and make backup then edit this file:
For Moderator: if this tutorial already post please remove it
Open and make backup then edit this file:
Code:
/etc/sentora/panel/modules/dns_manager/code/controller.ext.php
Code:
static function IsValidIPv4($ip)
{
//if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )) {
return TRUE;
} else {
return FALSE;
}
}
static function IsValidIPv6($ip)
{
//if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 )) {
return TRUE;
} else {
return FALSE;
}
}
For Moderator: if this tutorial already post please remove it
Hi hello, Please visit my website: hrace009 Personal Blog