Jump to content

ipv4/ipv6 issue with whmcs license software


Recommended Posts

the biggest issue lately is more and more people are using ipv6, the licence addon does not automatically detect both, it only does one or the other..


This is a continuous issue for those of us that use ipv6 and ipv4 on our servers, if we access the site on ipv4, then the system will say that the license is invalid.


whmcs needs to update their software to deal with both ip addresses and pull both sets of ip's for the licensing.

Link to comment
Share on other sites

i have this same problem right now, is confirmed if i enter on a ipv4 network no problem, but on a ipv6 i gets the licence warning ¬¬


I can confirm this is a continued problem in the coding of this software. I've had to have whmcs.com to add both ip's into their system. Their software should automatically check for both ip's and input both into the system for authorized ip's.



I also find it funny that whmcs posted this as unconfirmed when I have a support ticket for this: IEM-296492 (closed) This is confirmed from your own staff.

Edited by panacheweb
Link to comment
Share on other sites



I am afraid I can't count this as a bug report yet. As a web application we don't get access to all of the server's configuration. We read what IP address you are running on from variables set by the web server. Most webservers return the IPv4 address on connections coming over IPv4 and the IPv6 address for connections coming over IPv6. We can't simply pull both addresses from the network interface descriptions or vhost definitions and link a license to both right away.


If you have installed WHMCS on a dual stack server where it has both an IPv4 and an IPv6 address, if you open a ticket with our customer service team and list both IPs you will be using, they can ensure your license is authorized for both addresses and things work without issue. We have had internal discussions about ways to remove the human interaction requirement for dual-stack systems, but ultimately that will be a new feature, not a bug. Thus I am going to close this thread. The bugs forum is specifically for reporting issues where the product is not behaving as the development team intended it to.


Have a great day,


Nate C

Link to comment
Share on other sites

  • 2 weeks later...

The issue with the coding is this:


$domain = $_SERVER['SERVER_NAME'];



When you connect via ipv6 server_addr pulls the ipv6 of the server, if you connect via ipv4 it connects via v4.


There in lies the problem with the coding. The software needs to be able to be coded to check for both v4 and v6.


More and more hosting companies are using dual stack during the conversion the coding must be changed to accommodate both ipv6 and ipv4.


the code needs to be updated.


$domain = $_SERVER['SERVER_NAME'];

$v4 = dns_get_record($domain, DNS_A);

$ipv4 = $v4[0][ip];

$v6 = dns_get_record($domain, DNS_AAAA);

$ipv6 = $v6[0][ipv6];


if(empty($ipv6)) {$usersip = $ipv4;} else { $usersip = $ipv4. ", ". $ipv6; }


if you are running just ipv6 the original code would work just fine, this is designed for those that are running dual stack ipv4, and ipv6


The caveat of this method is if someone is using a domain that is not pointing to their server, it will link to the actual ip addresses of the domain.


However, I do recommend that WHMCS and every one else using the licensing module should update this part of their code.


I've done the basics here without any checks and balances to verify that the ip addresses vs those that are looked up via the dns method.

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated