Last active
April 27, 2018 17:47
-
-
Save DomPizzie/cc19c23f706a6ce5398cc834a9eb9deb to your computer and use it in GitHub Desktop.
Web server Lockdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### First Method ### | |
<Limit POST PUT> | |
Order deny,allow | |
Deny from all | |
# Allow internal LAN | |
Allow from 10.0.0.0/8 | |
Allow from 127.0.0.1 | |
</Limit> | |
### Second Method ### | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_METHOD} ^(POST|PUT) | |
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$ | |
RewriteCond %{REMOTE_ADDR} !^10\..* | |
# Either forbid the content, or you can redirect to specifed website | |
RewriteRule ^.* - [F] | |
</ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment