Re: alternative to /etc/hosts
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