Closed oiLvAcciNe closed 2 years ago
This looks like your NAT rule may not allow for fM to connect to the NAT IP on 8081 or you need a SNAT due to asymmetric routing. Essentially fM needs to connect to itself for this test and I don't think your SYN-ACK is going back through the firewall.
Not sure if its that. I have iproute on the server ... so everything that comes in one interface will go out in the same interface. But i can try to debug this nat in more detail .. ... Even if i change the direct private ip from port 80 to port 8081 ... i get the same "Requirement Error" ... What is this $test_output looking for?
tks dS
I took a closer look at the code and it does not currently support non-standard ports. If you look in server/fm-modules/facileManager/variables.inc.php line 40 you will see $GLOBALS['FM_URL'] does not contain a server port so it uses standard http/https ports. Until a permanent fix is implemented, you can change that line to:
$GLOBALS['FM_URL'] = $GLOBALS['REQUEST_PROTOCOL'] . '://' . $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . $GLOBALS['RELPATH'];
Thanks for looking into it. I think i had already tried manually in init.php changing this to a manual link just to test but with no luck. ... The [HTTP_HOST] var will contain the server port if it is on the url ... there is no need for the $_SERVER['SERVER_PORT'] Tried adding it but i get this from the output:
echo "5-".$GLOBALS['FM_URL']."
";
5-http://dnsadmin.
Yesterday to solve the public snat i had to add the public url (dnsadmin.
_(P.S: the $_SERVER['SERVERPORT'] was not needed)
fM Version : 4.1.2 fmDNS Version : 5.1.1
Does fmDNS have any problems working on ports other that port 80 ?
What what i am trying to do it to perform a NAT from:8081 to :80 on our fw.
I have fm running inxxx.pt:80 ... (private_ip).
Works fine
NAT also works ... it redirects correctly:8081 --> :80
it reaches apache, set up properly, ... but then i get this Requirement Error
Already looked at issues 335 / 461 / 410 ... but i thing in this case it could be a diff issue.
Have already tried some debugging in fm-includes/init.php But have not come to a real conclusion
Some debugging in " if (!defined('INSTALL')) {"
echo "1".$_SERVER['SERVER_NAME']."\
"; echo "2". echo $test_output."\
"; $test_output = isSerialized($test_output) ? unserialize($test_output) : $test_output; echo "3".echo $test_output."\
";
print_r(@dns_get_record($_SERVER['SERVER_NAME'], DNS_A + DNS_AAAA)) ;;echo"\
"; echo "4". $test_output."
"; echo "5". $GLOBALS['FM_URL']."\
"; die();
Output from 8081 shows![image](https://user-images.githubusercontent.com/93989004/148396843-16d54261-8406-4f3b-bc4b-3964bb5ccb92.png)
Output from normal 80![image](https://user-images.githubusercontent.com/93989004/148396680-ef9812e0-9715-4933-997e-2ce3089c12fe.png)
So it looks like it does not retrieve anything from the var "$test_output" when port is 8081 $test_output = getPostData($GLOBALS['FM_URL'] . 'admin-accounts.php?verify', array('module_type' => 'CLIENT')); $test_output = isSerialized($test_output) ? unserialize($test_output) : $test_output;
For tests purpose have have already configured apache ports/virtual host on port 8081 (first image) but same result. Does it need any other confs like in config.inc.php or other ...
Any ideias, comments? Regards