• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: alternative to /etc/hosts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alternative to /etc/hosts


  • Subject: Re: alternative to /etc/hosts
  • From: "Peter Sichel" <email@hidden>
  • Date: Tue, 14 Aug 2007 11:24:02 -0400

On 8/13/07, Josef Andrysek wrote:

>Hi All,
>  I need to dynamically define a dns records, which will be valid for
>my application only.
>Writing into /etc/hosts solves this problem only partially. It is
>valid for all applications and it requires root permissions to write
>something into /etc/hosts.
>
>Is there please any possible solution?  My application uses some
>third-party libraries, so I can not simply change the code
>responsible for domains resolving.

I can't offer a perfect solution, but here are a couple ideas
you might consider:

(1) You might use a socket or interface filter to intercept
    and respond to certain DNS requests.

(2) You can run a local caching name server using UNIX named fairly
easily (my own IPNetRouterX does this).  You can tell named
what addresses to accept requests from.  This might give you
the flexibility to respond only to your application (if you
can create a unique address for it).  You can also define your
own dns records.

In general, trying to change the behavior of the local Domain
Name Resolver without affecting other applications is a tricky business.
If you say more about what you are trying to do, someone might offer
another approach.

- Peter Sichel
  Sustainable Softworks
  www.sustworks.com




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >alternative to /etc/hosts (From: Josef Andrysek <email@hidden>)

  • Prev by Date: Re: NSWorkspaceWillPowerOffNotification events
  • Next by Date: Re: alternative to /etc/hosts
  • Previous by thread: alternative to /etc/hosts
  • Next by thread: Re: alternative to /etc/hosts
  • Index(es):
    • Date
    • Thread