?
Solved

How to deny an PC name in .htaccess file?

Posted on 2009-05-14
3
Medium Priority
?
327 Views
Last Modified: 2013-11-16
Hi,
How can I deny an pc name with .htaccess file?

Thanks,
HPvH
0
Comment
Question by:HPvH
3 Comments
 
LVL 3

Accepted Solution

by:
cevoman earned 600 total points
ID: 24388406
Hi there,

You can't as the server won't know about the PC name on a network
Only IP and Hostname

Kind regards
James
0
 

Author Comment

by:HPvH
ID: 24388452
Ok, how to deny a range?
0
 
LVL 11

Assisted Solution

by:Todd Mummert
Todd Mummert earned 400 total points
ID: 24389560

you can allow/deny a range using a partial domain name, or a range of IP addresses.   The latter is a bit tricky as it has to be specified in CIDR notation, which allows you to specify a contigous set of addresses on well defined boundaries.      You may have to specify multiple small groups to deny if you're not blocking on netmask boundaries.


for example:
   deny from   9.0.0.0/8      # blocks all of the 9.0.0.0 network
   deny from  192.168.1.0/24  # blocks only the last octet (0-255) of addresses
   deny from cnn.com     # block on a domain name

see http://httpd.apache.org/docs/1.3/mod/mod_access.html#allow    for more info on the allow/deny syntax

and

http://en.wikipedia.org/wiki/CIDR_address

for more info on CIDR notation

0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question