How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Allow IPv6 and IPv4 in Licensing Module



135 Votes
Login to Vote
Lets get WHMCS to add a feature to allow both IPv6 and IPv4 addresses. Make it an option within the module if you want to allow that or not. When an IPv4 first connects back, it registers it, same thing happens with the v6 address. Depending on my cell phone service, I sometimes connect to WHMCS in ipv6 which says I'm unlicensed. I have to reissue it and then can login. I did find out if you ask, you can get it manually put in, but that could save me a headache and them time!

Thanks!
Merged Ideas
    Allow WHMCS license to contain both an IPv4 and an IPv6 address
    When our license only had our IPv4 address allocated, admins could only connect to the admin control panel using IPv4. If they tried to connect using IPv6 (which happens automatically if possible by the user on our website) then they would be presented with an invalid license error. We reissued the license and when it had the IPv6 address allocated then the same problem happened but with anybody connecting using IPv4. Now that both the IPv6 and IPv4 addresses are allocated to our license this issue has gone away. To fix this the only way is to contact licensing to manually add both addresses to your license. As IPv6 becomes more widespread this issue will become a major problem down the road so the best thing to do is to add this feature before that happens.
    IPv6 For Licensing
    Hi!As IPv4's are to be forgotten about, as less and less are available, I find it very important that WHMCS put's IPv6 upfront.As of right now, we have to contact support to add our IPv6 to our licence. If that could be automatic, that would be great.Also, it would be nice if there was an alert in system health if ipv6 is not enabled.The global transition to V6 starts by IT providers, and WHMCS is the platform for a huge amount of IT and Cloud providers.Cheers,

27 Comments

Login to post a comment.

When ordering directly from WHMCS, I've found that a license can be licensed to both an IPv4 and IPv6 which is helpful for dual stack environments and eliminates the license updates for us
IPv6 isn't going away and dual-stack IPv4/IPv6 environments are becoming extremely common.

For hosts that use a dual-stack IPv4/IPv6 environment and are reselling WHMCS, having support for dual IPv4/IPv6 IP address on a license is a necessity.

Having to submit a request to WHMCS licensing to have them add the IPv6 IP address every time we issue an WHMCS license to a client shouldn't be a thing.

All licenses should support 1 IPv4 IP address and 1 IPv6 IP address.

In the same manner the first IP address WHMCS is accessed on being assigned to the license, it should be programmed to know the difference between IPv4 and IPv6 and assign them each to the license when/if the WHMCS instance is accessed from either.
Just wanted to add, ModulesGarden (which uses WHMCS for licensing) are able to automatically add both the IPv4 and IPv6 IP address to a license for their products, so why can't WHMCS themselves?

It would easily cut down on the amount of support tickets to the WHMCS licensing department and boost productivity all around. Seems like a no brainer.
Here I have the answer of my doubt: Yes, WHMCS also does add the IPv6 IP manually to their licences.
If a website has an IPv6 address, it also has an IPv4 address in most cases. Depending on the connection to the licensing server, the license check might go over IPv4 or IPv6. This can change, so if the license has the IPv4 address, the IPv6 will not validate. It needs to be able to store one IPv4 and one IPv6 per license instead of just one address.
Each time I move my WHMCS to a new VM that gets a new IPv4 and IPv6, I end up having to open a support ticket with WHMCS so they add my IPv6 address, otherwise I might find myself randomly not able to use WHMCS due to licensing error.
Same thing goes for my customers that have licenses with me. It's an annoying problem and a waste of time to handle this manually.
How do you envisage this working? In a single license validation request only one IP will ever be returned or be the originator of the request. And once that one IP has been stored as the valid IP for the license, the license will no longer be in a reissued state and therefore future validation calls would typically not alter the list of valid IP addresses for a given license key.

Please tell us more about the experience you desire to see here so we can better understand the request for change.

Thank you.
[co]
  • How do you envisage this working?
  • [/co]And how you do with WHMCS License? Do we contact support and request to add the IPv6 IP manually to the license?



    [co]
  • In a single license validation request only one IP will ever be
    returned or be the originator of the request. And once that one IP has
    been stored as the valid IP for the license, the license will no longer
    be in a reissued state and therefore future validation calls would
    typically not alter the list of valid IP addresses for a given license
    key.
  • [/co]Yes, correct and this is where all the logic fails when it comes to validate a dual stack environment and where we should start to think: Are we doing it the right way?
    Once a license has been validated, the information is stored in the localkey and this key is queried each time. We can detect if the IP is a IPv4 or an IPv6 IP. If the stored IP is v4 and the IP is now an IPv6, then it should be validated. The same viceversa. This said, it should not only check if the IP is valid, it should also check if the IP is v4 or v6. Only one v4 and only one v6 IP will be allowed and validated.
    The License Addon got two different validation urls. The first one is only available via ipv4 and the second one is only available via a dns record with a ipv6 address.
    Now for the validation for a Addon, the Addon try to connect via ipv6 url the license Addon api. If it is successful connected, the Addon got the typical license details. After that request, the licensed Addon made a second request to the license Addon api via the URL that only available over ipv4. The ipv4 request made a update in the license Addon product details and note the ipv4 IP. Now the whmcs has the ipv4 and ipv6 IP addresses. If the customer whmcs not available via ipv4 or ipv6 the only way that is accessible will be used and only stored in the license Addon product details.
    Now, no more problems with ipv6 and ipv4...
    It looks to me that this is something we need to improve by our self. We can improve the provided standard php code for license check to allow 1 Ipv4 and 1 Ipv6 IP. However, it would be really nice to have the standard php code for the license check improved by WHMCS.
    It is an absolute must that the licensing addon IPv4 and IPv6 automatically detects. It is annoying for the customer to create a ticket to add the missing IP manually, because the module only recognizes one IP and not one IPv4 AND one IPv6. In the worst case the module does not work at the customer because the IPv4 is recognized and stored, but the connection is running over IPv6.
    For the customer it is annoying and for us this means unnecessary support effort and annoyance if the module does not run at the customer. The detection of IPv4 and IPv6 could be easily checked with FILTER_FLAG_IPV4 and FILTER_FLAG_IPV6.
    The Addon works for IPv6 and for IPv4 but not with both at the same time. A server with dual stack will certainly have troubles when it comes to validate as license validation request are coming in randomly, with IPv4 or IPv6 addresses.

    The Licensing Addon is a great tool and you should take in consideration to add support for dual stack
    Hi there,
    WHMCS is written in PHP so doesn't do IP address detection itself, it comes form PHP's SERVER_ADDR variables. So provided your PHP configuration is IPv6 aware, then WHMCS' licensing will be too.
    John, please consider to change the tag "Already Possible" as the issue is not the IPv6 Address itself, that works.

    The issue is when you run WHMCS on a dual stack where license calls are coming randomly from IPv4 and IPv6 addresses.
    This is very important, WHMCS should consider this HIGH priority!
    Very-very-very annoying problem :@
    Or, you could send both addresses in the initial registration request and compare the one from the request with the payload. For example:

    Do a lookup to https://ipv6.wtfismyip.com/text and https://ipv4.wtfismyip.com/text, and send those in the registration request body. Then, save both.
    I agree with @Seb, that sounds sensible. It certainly is not a future-viable solution to have to do it manually. And re how to detect an IPv6 address - Plesk sure can, just check how they do it - something like this should do:

    netstat -tulpn 2>/dev/null | grep :80 | awk '{print $4}' | sed s/:80//g

    If the server is not listening on Port 80, but only on 443, then do both and take the superset as answer.
    You would allow 1 ipv4 and 1 ipv6 address... So if the license is provisioned to an ipv4 address and a request comes from an ipv6 address, you could add that automatically if there is no ipv6 yet. And the other way around as well.
    And just to make sure there is no abuse, make sure that both ipv4 and ipv6 addresses resolve to the same hostname (reverse lookup) before adding.
    How would we handle this with a single license status? So like right now when a license is reissued we replace the allowed location when it is next accessed. When we store that the license status then changes to Active. How would we determine when to store another? How would we know when not to allow access from another?
    I think on the license module side, if you duplicate the code path existing for the IP address tracking and put conditional wrappers on them to only work for IPv4 or IPv6.

    E.g. If the code path checks the inbound connection's source IP address against the stored information in the database. If it matches respond with a positive, OR if not, reply negative. If it's a new license, accept source IP with positive response then store source IP in database.

    Would become, check inbound source IP to see if IPv4 or IPv6. (The rest of the steps is the same, replace IP address with appropriate IPv4 or IPv6. Each IP type would be stored in it's on record/field). Check to see if source IP address is valid, if so respond positive, if not respond negative, if no existing IP address to match then respond positive and store it.