I have to create code inside the directory container in my main Apache 2.4 configuration file . I need to permit access from everywhere including 137.37.120.1 (which was previously written with require not 137.37.120.1) but disallow any other access from the class C subnet 137.37.120.0 to the directory. I was given no information on the disallowing access part, so I’m not sure how to write it. Could anyone tell me what Class C subnet means, and how I’m supposed to write it into my code?
Last time people got mad I asked about workbook questions without telling you what I tried so I tried to just do
<Directory htdocs>
<RequireAll>
Require all granted
Require not ip 137.37.120.0
</RequireAll>
</Directory>
this is correct on a normal basis, this was the same format as the question before this that i got right without mentioning an IP with a class C subnet, but I’m simply at my limit in knowledge. I also know to block ipV6 with the ::. But on this specific workbook question my mentor marked it wrong and I have to wait until next week’s session to get the correct code here. I just want to understand that second part and what it would look like to actually work and not break my server because I’m trying to not break my server as I still need to use it this week.