Forum Moderators: phranque

Message Too Old, No Replies

Visible only within LAN

Setting up apache so its only Visible within LAN

         

Sonnenblume

9:53 am on Dec 15, 2006 (gmt 0)

10+ Year Member



Im setting up a small intranet site and planning on using apache to act as a web server on a local machine within the LAN.

My question is this. How do I configure apache so that its only accessible to users within the LAN (but not to anyone else, i.e. so its available on the internet as it where).

Thanks!

phranque

12:00 pm on Dec 15, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you can specify a list of ip:port addresses with the Listen directive:
[httpd.apache.org...]

jdMorgan

2:41 pm on Dec 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By far the simplest way is to make sure that the server is only listening to the local, non-routable LAN IP address and that your router does not forward WAN requests to it (See "port-forwarding" in your router manual). Addresses such as 192.168.x.x, 172.16.x.x through 172.31.x.x, and 10.x.x.x cannot be routed, and therefore are only available on those local subnets.

Jim