Allow IP Address Range In hosts.allow

23,860

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

Solution 4

using a mixture of what you both put, i managed to get it.

it was 94.0.0.0/255.240.0.0

Share:
23,860

Related videos on Youtube

James
Author by

James

Updated on September 17, 2022

Comments

  • James
    James over 1 year

    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

    • Skippy le Grand Gourou
      Skippy le Grand Gourou over 5 years
      See also section PATTERNS of man hosts.allow.
  • James
    James about 13 years
    thanks, but didn't work for some reason
  • user9517
    user9517 about 13 years
    @James:In what way does it not work ?
  • James
    James about 13 years
    Well i remote logged in to my home pc to test it, and it didn't let me in, but when i changed it to 94.0.0.0/255.240.0.0 it worked. Maybe i did something wrong?
  • James
    James about 13 years
    That calculator is incredibly useful, ty
  • CronosNull
    CronosNull about 13 years
    Sorry, I had a little mistake there, you must use 94.0.0.0/255.240.0.0, You must use the network address, 94.0.0.0 in this case. I glad you has figured it out by yourself :)