Mysql remote IP with wildcard

Discussion in 'Feature Requests' started by Gino Morilla, Nov 21, 2023.

Tags:
  1. Gino Morilla

    Gino Morilla New Member

    Hi there,
    it would be a minor improvement, but much useful depending of the case...

    Mysql uses "%" as wildcard for remote authenticating host, so:
    - 172.16.0.1 is valid
    - 172.16.0.% is valid (C network)
    - 172.16.%.% is valid (B network)
    - 172.16.0.0/255.255.255.0 is valid (another way to enable a C network in MySQL)

    Problem is currently we cannot enable networks for remote access.
    I have seen plugin is using FILTER_VALIDATE_IP php function, which cannot validate a network range, for example 172.16.0.0/24.

    Possible suggestions:
    - discard using FILTER_VALIDATE_IP and just use regex, allowing "%" characters.
    - discard using FILTER_VALIDATE_IP and just use regex to validate IP, allowing also network masking, for example: '172.16.0.0/255.255.255.0'

    Cannot tell about regex on ipv6...

    Regards,
    Gino
     

Share This Page