Hello,
There's a work in progress DNS library for Factor. Part of the library is a
DNS server which does "caching" and "forwarding". I.e. if it has the answer
to your query in it's cache, it provides the answer. Otherwise, it looks
at "upstream" nameservers, such as those provided by your ISP.
I run the caching server on my workstation, mainly for fun and to test out the
DNS library. I get extreme pleasure from being able to peek and poke at the
DNS cache from the Factor listener. Here's a little howto for those
interested in trying it out.
The server listens on port 53 so you'll need to run Factor as root:
$ sudo ./factor
Load the right vocabulary:
USE: dns.forwarding
Ladies and gentlemen, start your engines:
[
T{ inet4 f f 53 }
{ "68.87.77.130" "68.87.72.130" "68.87.75.194" }
start-server
] in-thread
The 'start-server' word accepts an addr-spec and a list of upstream
nameservers. The above addr-spec indicates all local interfaces and port 53.
The nameservers listed there are from my ISP. Change those to yours...
Alright, at this point you can test it out using the dig utility:
$ dig @127.0.0.1 www.google.com.
The output will show you how long the query took. If you run the same query
more than once, you should see the query time go down drastically in the
subsequent queries since the answer will likely come from the local cache.
Next, take the step which will put some hair on your chest. Make a backup copy
of your '/etc/resolv.conf' and set the new contents to:
nameserver 127.0.0.1
Surf the web for a while and make sure things are working.
Finally, experience extreme pleasure:
USE: dns.cache.rr
cache keys .
You should see a list of keys from the resource record cache. You can look at
the whole cache too:
cache .
It's alpha software. Don't run your enterprise on it. Have fun.
Ed
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk