Allow IP Address Range In hosts.allow

I would like to allow this Ip Range 94.1.1.1 to 94.15.255.255

I tried inputting this in the hosts.allow file after reading here that you need to use networks and netmasks? i don't know much about this so i don't know what i have done wrong.

94.1.1.1/255.255.255.255

but it did not work.

What should i be putting in the file to make it allow that ip range?

Thanks


Solution 1:

Using this subnetting calculator I get

94.1.1.1/12

as the value to put in your hosts.allow

Solution 2:

The Correct answer which I tested and is working is as follows.

94.1.  # (just leave everything after the dot .)

In the case if you are manually editing the host.allow file.

Anything you put like / will be not allowed in host file as per my experiments.

If you want to allow your ip range the code should be look like this.

whostmgrd :94.1. :allow
whostmgrd : ALL : deny

This will prevent WHM login and allow only IP starting from 94.1.
Hope this will be helpful to you.

Solution 3:

I think you should be able to use 94.0.0.0/12 or 94.0.0.0/255.240.0.0