Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/151018-solved-block-external-access/
Share on other sites

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.