T-Bird Posted March 25, 2009 Share Posted March 25, 2009 Sorry if it's been asked a billion times, and sorry if the following doesn't make sense. I've never done anything with apache outside of a GUI, like my webhost's control panel. I'm going to be setting up a dedicated server as a fileserver for external, internet, access and I want it to hold some internal, intranet, pages for manipulating the MySQL databases that regulate the file flow. Ideally I'm looking for a simple way to block all external traffic without using an authentication method. Can I do a simple IP mass block with a whitelist and allow only traffic with the IP 192.168.x.xxx to access the subfolder holding my intranet pages? If not is there another simple, relatively secure, way to make only a specific directory local-access only while leaving the rest of the server open to the public. Again, sorry if this has been asked before, or if it's something that's exceptionally easy to do. I know next to nothing about the workings of Apache. Thanks in anticipation of the help. Quote Link to comment https://forums.phpfreaks.com/topic/151018-solved-block-external-access/ Share on other sites More sharing options...
wildteen88 Posted March 25, 2009 Share Posted March 25, 2009 You can place a .htaccess file where your intranet only files are and place the following code within it Order Allow,Deny Allow 192.168.1 That will allow anyone with the internal ipaddress of 198.168.1.1 through to 198.168.1.255 access your intranet files. Manual on the Allow directive Quote Link to comment https://forums.phpfreaks.com/topic/151018-solved-block-external-access/#findComment-793832 Share on other sites More sharing options...
T-Bird Posted March 25, 2009 Author Share Posted March 25, 2009 Awesome. I figured it was something like that, but I wasn't really sure where to turn other than here. I appreciate the link as well. Hopefully I'll be able to answer my own question next time now. Thanks a bunch. Quote Link to comment https://forums.phpfreaks.com/topic/151018-solved-block-external-access/#findComment-793976 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.