Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to handpick few ip addresses to allow access to localhost over LAN and rejecting other incoming connections? I am running XAMPP.

OS : Windows XP

share|improve this question

migrated from stackoverflow.com Oct 4 '11 at 10:10

This question came from our site for professional and enthusiast programmers.

    
Nitpick: Localhost is 127.0.0.1 and can not be accessed from LAN or any host other than itself. –  Turbo J Oct 3 '11 at 18:04
    
XAMPP on Windows host? –  Turbo J Oct 3 '11 at 18:07
    
Yes it is possible, you need to tell us the OS for more help –  jman Oct 4 '11 at 7:07
    
Its windows XP. –  Gary Lindahl Oct 4 '11 at 7:33

1 Answer 1

Yes.

Create .htaccess file.

Inside place...

order deny,allow
deny from all
allow from 192.168
allow from some.ip.address.1
allow from some.ip.address.2

This will allow from all LAN IP that start with 192.168, plus two specific additional IPs. Reject all others.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.