I have a web app running on my local machine.

I want to expose the app on my local corporate network.

I know that I can expose it via the currently assigned ip address as:


However I have figured out my local computer name using

scutil --get ComputerName

It returns my computer name as anands

I have it registered on my /etc/hosts file as anands

But when I try to expose it via


people on my local network are not able to access it

  • Each person who need to modify their hosts file. Obviously they can't point your computer name to for obvious reasons.
    – Ramhound
    Oct 8, 2015 at 13:33

1 Answer 1


You need to add your IP address (not localhost and name to the local DNS server (another machine on your local network that is used as DNS server). In this way other computers will know that a corresponding name is located to your IP that they can reach.

The way you have done it, you are telling only to your machine that name and others can't resolve that name to IP without the help of a DNS server

  • But the ip keeps changing everyday right as these are dynamic IPs ?
    – Andy
    Oct 8, 2015 at 13:30
  • @Andy - Configured your network not to give out dynamic ip addresses in that case.
    – Ramhound
    Oct 8, 2015 at 13:33
  • @Ramhound thanks for the suggestion but I do not have control over it in a corporate network
    – Andy
    Oct 8, 2015 at 14:13
  • 1
    @Andy - Then speak to somebody who does. At that point they can solve the problem caused by dynamic addresses or always assign you the same intranet address.
    – Ramhound
    Oct 8, 2015 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.