LAN Licensing system to do external checks to prevent need for eth0:0

Version 1.531

Feature
Finished

As per the directadmin.com/lan.php guide, it can be tricky and annoying to get DirectAdmin install within a private network. This change clears the biggest confusion with regards to that by doing an outbound check to confirm what your server IP is, should the standard eth0:0 style check fail. This will allow DA to run even if step #2 from lan.php was missed. However this affect DA's ability to do a local lookup of the server IP used for various things, like the |SERVER_IP| token in the templates, binding for updates, or any other area that DA needs to know the server IP. In the event that the eth0:0 check fails, but the new remote check passes, DA will internally set an IP override for the global function that does an IP lookup on the main ethernet_dev device, using the external lookup value instead. (Just means that if you change your main server IP, DA should be restarted to figure out the new IP), since it's no longer a dynamic/live value. Also, this check is ONLY done if the lan_ip value is set, most likely to your internal IP address, like 192.168.0.2, for example. The main reason for adding this check is to allow some systems (eg: jail in FreeBSD) where only 1 IP is allowed, and it's the internal IP, preventing adding the external IP to eth0:0. Note, if you have a proxy for outbound connections, then this tool won't work correctly, and you will need to ensure the licensed IP is added to eth0:0. To clarify, I used eth0:0 as an example. the eth0 device name on your box may differ, so adjust as needed.

Interested to try DirectAdmin? Get a 30-day Free Trial!