"Deny from all" & "allow from ip" works for WAN IPs but not LAN
Posted by: Gutspiller (---.hsd1.ut.comcast.net)
Date: February 16, 2014 01:39AM

I am having trouble using the "Deny from all" setting, while still making my site accessible locally, as well as from specific ip addresses INSIDE my lan.

localhost works, but trying to access the site from the ip address from that same machine doesn't work, nor does trying to access the site from any other machine or tablet from within the same LAN, but accessing the site from OUTSIDE the lan on another computer, works by using the machines ip address.

Any machine or tablet that I am trying to connect to the site, I have added to the httpd config file as follows:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
Allow from *.*.*.* (localhost ip)
Allow from *.*.*.* (wan machine)
Allow from *.*.*.* (lan machine)

Because the WAN machine is working, I know the problem isn't with the router settings for opening port 80. I've even tried inserting the LAN IPs from the local LAN machines & tablets in the "allow from" lines for simple troubleshooting, but it was without success.

For security concerns, I cannot have "Allow from all", although I have temporarily tested it, and it does allow other local LAN machines access.

I'm not sure what the problem is, since a WAN machine can connect, but a local LAN machine can't.

I've done the simple tasks of restarting services, after each test, to no avail.

Does anybody know what could be causing this issue?

Options: ReplyQuote
Re: "Deny from all" & "allow from ip" works for WAN IPs but not LAN
Posted by: RiggsFolly (---.as13285.net)
Date: February 16, 2014 02:20AM

Try just using this


Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
Allow from 192.168.0


Note I use only the first 3 quartiles of the normal 4, to allow any internal ip access to the Apache server. Assuming you are on a subnet that starts with 192.168.0

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.