mac - Making a Server Directory Accessible via LAN but not Externally

02
2013-08
  • danielhanly.com

    I have installed MAMP on our server to allow all web developers to code from the same area.

    It's currently accessible via our 192.x.x.x IP address (i.e. internally).

    However, it's also accessible via the server's external IP address - which means that our in-development projects are accessible to the outside world.

    How do we stop this happening?
    We want it to still be accessible internally, but not via an external IP address.

    Is this possible?

  • Answers
  • 0wn3r

    U just have to set up the apache virtualhost correctly, usually a vhost is set like:

    < virtualhost *:80 >

    u have to set it like

    < virtualhost 192.168.1.0/24:80 >

    This will affect all the apache folders, in alternative u can set the specific directory inside the virtual host like this example

    < Directory "/Applications/MAMP/myproject/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 192.168.1.0/24
    < /Directory>


  • Related Question

    ubuntu - How can I make sftp accounts that can only access their home directory?
  • LonnieBest

    I'm using Ubuntu Server 9.10.

    I need to setup 6 accounts for users that will exclusively need sftp. When the user logs in, I need them to only have access to their home directory. I don't want them to be able to navigate to any other places in the file system. I need their ability to type commands to be limited to only the commands needed to view and transfer files back and forth to their home directory.

    Can anyone offer some guidance on setting things up this way?


  • Related Answers
  • Cry Havok

    Try this guide for Debian, which should work perfectly for Ubuntu.

  • douglasj

    We recently had the same issue but also needed to allow ftp and scp access with the users chrooted to their home directories.

    We used ProFTPD with the mod_sftp plug-in, net2ftp as a front-end to the ftp server, Sun's DSEE7 for user accounts (openldap with the posix schema would work too), and the OS's auto-mounter to mount home directories.

    If only need sftp with local accounts then Cry Havok's solution is good, it was the first one we tested with.