public void configureIpNetworkRange(final String ipAddressRange) {
        if (StringUtils.isNotBlank(ipAddressRange)) {
            val splitAddress = Splitter.on("/").splitToList(ipAddressRange);
            if (splitAddress.size() == 2) {
                val network = splitAddress.get(0).trim();
                val netmask = splitAddress.get(1).trim();

                try {
                    this.inetNetworkRange = InetAddress.getByName(network);
                    LOGGER.debug("InetAddress network: [{}]", this.inetNetworkRange.toString());
                } catch (final UnknownHostException e) {
                    LOGGER.error("The network address was not valid: [{}]", e.getMessage());
                }

                try {
                    this.inetNetmask = InetAddress.getByName(netmask);
                    LOGGER.debug("InetAddress netmask: [{}]", this.inetNetmask.toString());
                } catch (final UnknownHostException e) {
                    LOGGER.error("The network netmask was not valid: [{}]", e.getMessage());
                }
            }
        }
    }
public void configureIpNetworkRange ( final String ipAddressRange ) { if ( StringUtils . isNotBlank ( ipAddressRange ) ) { val splitAddress = Splitter . on ( "/" ) . splitToList ( ipAddressRange ) ; if ( splitAddress . size ( ) == 2 ) { val network = splitAddress . get ( 0 ) . trim ( ) ; val netmask = splitAddress . get ( 1 ) . trim ( ) ; try { this . inetNetworkRange = InetAddress . getByName ( network ) ; LOGGER . debug ( "InetAddress network: [{}]" , this . inetNetworkRange . toString ( ) ) ; } catch ( final UnknownHostException e ) { LOGGER . error ( "The network address was not valid: [{}]" , e . getMessage ( ) ) ; } try { this . inetNetmask = InetAddress . getByName ( netmask ) ; LOGGER . debug ( "InetAddress netmask: [{}]" , this . inetNetmask . toString ( ) ) ; } catch ( final UnknownHostException e ) { LOGGER . error ( "The network netmask was not valid: [{}]" , e . getMessage ( ) ) ; } } } }
Sets ip network range.

@param ipAddressRange the IP address range that should be allowed trusted logins