Sentora Support Forums
[TUTORIAL] Allow Private DNS - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: DNS Support v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=34)
+---- Thread: [TUTORIAL] Allow Private DNS (/showthread.php?tid=3087)



[TUTORIAL] Allow Private DNS - hrace009 - 09-09-2016

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