[TUTORIAL] Allow Private DNS
#1
[TUTORIAL] Allow Private DNS
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:
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 Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)