LAN and WAN access
Posted by: olsen (---.Red-81-35-252.dynamicIP.rima-tde.net)
Date: March 21, 2012 05:05PM

Hi all,

Well, what i had tried to do its to restrict some acces to my local wampserver from the WAN without denied acces from the LAN.

I try to explain.

LAN Access
Adress Destination Folder
Local IP wamp/www
Localhost wamp/www

WAN access
Adress Destination Folder
Public IP Forbiden
myrouter.dyndns.org wamp/www/site (virtual host)

Thats means, if i type in for example "localhost" or a local ip as 192.168.0.* open the wamp index.php file, and if i type "myrouter.dyndns.org" open wamp/www/mysite, and for instance if it is typed wan ip adress as for example 84.52.31.9 gets 403 forbiden error or redirect to a subfolder.

By now, if i type localhost or lan ip it open wamp/www folder and if type router.dyndns.org open my site defined on vhost.conf, but if typed in wan ip adress open wamp/www. This is the access i want to restrict or redirect to another folder. My ISP provide me a Dinamyc IP access.

I tried diferent configs under httpd-vhosts.conf and http.conf but unfortunatetly not working at all sad smiley

If somebody can help me i will be very greatfully.
Thanks in advance
olsen

Options: ReplyQuote
Re: LAN and WAN access
Posted by: ahuggup86 (208.92.77.---)
Date: March 24, 2012 11:40PM

olsen Wrote:
-------------------------------------------------------
> Hi all,
>
> Well, what i had tried to do its to restrict some
> acces to my local wampserver from the WAN without
> denied acces from the LAN.
>
> I try to explain.
>
> LAN Access
> Adress Destination Folder
> Local IP wamp/www
> Localhost wamp/www
>
> WAN access
> Adress
> Destination Folder
> Public IP
> Forbiden
> myrouter.dyndns.org wamp/www/site
> (virtual host)
>
> Thats means, if i type in for example "localhost"
> or a local ip as 192.168.0.* open the wamp
> index.php file, and if i type
> "myrouter.dyndns.org" open wamp/www/mysite, and
> for instance if it is typed wan ip adress as for
> example 84.52.31.9 gets 403 forbiden error or
> redirect to a subfolder.
>
> By now, if i type localhost or lan ip it open
> wamp/www folder and if type router.dyndns.org open
> my site defined on vhost.conf, but if typed in wan
> ip adress open wamp/www. This is the access i want
> to restrict or redirect to another folder. My ISP
> provide me a Dinamyc IP access.
>
> I tried diferent configs under httpd-vhosts.conf
> and http.conf but unfortunatetly not working at
> all sad smiley
>
> If somebody can help me i will be very
> greatfully.
> Thanks in advance
> olsen

you need to either use an htaccess file for this in my vhost file i did this

# Client1
<VirtualHost *:80>
ServerName client.somesite.dyndns.org
ServerAlias client1.somesite.dyndns.org client1
DocumentRoot "E:/wamp/www/client1"
ErrorLog "E:/wamp/www/client1/logs/error.log"
CustomLog "E:/wamp/www/client1/logs/access.log" combined
<Directory "E:/wamp/www/client1">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

you can also change the allow from all to all from 127.0.0.7 or your lan ip when u do this only you can see site locally but you can have others see site worldwide but hiding your localhost directories..

or you can refer to here [guides.jlbn.net] they provide excellent guides to get your server setup properly

Options: ReplyQuote
Re: LAN and WAN access
Posted by: olsen (---.Red-81-36-201.dynamicIP.rima-tde.net)
Date: March 26, 2012 12:36AM

Hi,
I followed your advise and after add this directive

<Directory "wamp/www path">
Options Indexes FollowSymLinks
Order allow,deny
Allow from 127.0.0.7
</Directory>

onto my vhost file i had restricted access as i wanted.

Thank you for your help

Options: ReplyQuote


Sorry, only registered users may post in this forum.