1

we want a system where our server can be accessed only by 2 selected systems. Also we need to log any other attempted access.

One possible option we have is:

order deny,allow
deny from all
allow from <your ip> 

Is there any other solution better than this? Thank you in advance.

  • 1
    Yes, use a firewall. – Appleoddity Dec 6 '17 at 5:49
1

Your solution is sound. As appleodity said, you could also use a firewall (but in this case your solution is better because it will have more accurate logging).

You might want to couple this with fail2ban which monitors log files and can be used to email you and/or implement a firewall block on multiple attempts from the same IP.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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