# TinyDNS not working correctly! Maybe I am dumb?

## BobOki

Evidently I am stupid, or really just missing something.

Here is my setup:

External Internet ------- PIX 501(192.168.0.2)------Internal Network(192.168.0.x)

In that setup is my main server 192.168.0.1.

My PIX is currently configured as a DHCP server, and does NAT and is forwarding all DNS requests to the external ISP dns servers.

What I want to do is add a internal DNS server (and eventually DHCP) to 192.168.0.1.

What I have done thus far is install djdns (tinydns).

I have tinydns listening on 127.0.0.1. I have dnschachex listening on 192.168.0.1. I have my DNS records setup pretty simple, nothing spectacular.

Here is my data file for tinydns:

```
.boboki.com:192.168.0.1:a:259200

.0.168.192.in-addr.arpa:192.168.0.1:a:259200

+www.boboki.com:192.168.0.1:86400

+mail.boboki.com:192.168.0.1:86400

+test.boboki.com:192.168.0.1:86400

```

MAYBE that is a problem right there... Perhaps .boboki.com should be 127.0.0.1? I'll give that a try in a sec.

Anyways.... 

I have @ in /service/dnscachex/root/servers pointing to 192.168.0.2 (pix) in what I THINK is a forwarder.

```
animeserver env # ls

CACHESIZE  DATALIMIT  FORWARDONLY  IP  IPSEND  ROOT

animeserver env # cat FORWARDONLY

1

animeserver env #

```

Maybe I screwed it up perm like, becuase all I get is:

```
root      6744  0.0  0.0     0    0 ?        Z    13:02   0:00 [dnscache] <defunct>

animeserver main # tail current

@4000000040631f0327625bfc dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f0428a80afc dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f0529f8d1d4 dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f062b63fa94 dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f072ce821c4 dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f082e358184 dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f092f6e9dc4 dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f0a30b06c94 dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f0b31e6fc7c dnscache: fatal: unable to bind TCP socket: address already used

@4000000040631f0c33392ab4 dnscache: fatal: unable to bind TCP socket: address already used

animeserver main #

```

What the hell is using it, I have NO CLUE.

----------

## BobOki

*UPDATE*

I unmerged and remerged djbdns and redid everything. Now I no longer get the same socket in use error..

BUT

Its still not working.

```
animeserver main # ping www.rice.edu

ping: unknown host www.rice.edu

animeserver main # tail current

@4000000040632b990f6181f4 servfail 10.173.163.209.bl.spamcop.net.savana01.ga.comcast.net. input/output error

@4000000040632b990f62fcdc sent 76 71

@4000000040632b9b1aacd5a4 query 104 c0a80001:8023:e9d5 1 www.rice.edu.savana01.ga.comcast.net.

@4000000040632b9b1aad5e5c tx 0 1 www.rice.edu.savana01.ga.comcast.net. . c0a80002

@4000000040632b9e0be1e0b4 query 105 c0a80001:8025:f7db 1 27.0.1.10.bl.spamcop.net.

@4000000040632b9e0be32104 tx 0 1 27.0.1.10.bl.spamcop.net. . c0a80002

@4000000040632b9e0f8b167c servfail 27.0.1.10.relays.ordb.org. input/output error

@4000000040632b9e0f8c6a54 sent 77 43

@4000000040632ba30be6a75c query 106 c0a80001:8025:f7db 1 27.0.1.10.bl.spamcop.net.

@4000000040632ba30be7f74c tx 0 1 27.0.1.10.bl.spamcop.net. . c0a80002

animeserver main #

```

Its giving me nothing but server fail errors now.

----------

## BobOki

*UPDATE*

Ok, the config was correct, but I was wrong about the pix doing DNS translation. It was just assigning the external ISP dns servers via DHCP.

So I entered one of thier ips in manually and thats working now.

Now I have ONE final problem with it.

```
./add-host bobokimain.boboki.com 192.168.0.3

./add-alias www.boboki.com 192.168.0.1

./add-alias tenchi.boboki.com 192.168.0.1
```

These will not resolve even though they are in data then I did a make and restart.

They try to resolve to the external ip instead of the specified internal.

----------

## BobOki

I figured it all out.

My internal domain is boboki

So tinydns will only resolve .boboki stuff.

boboki.com is my external FQDN and tiny cannot do aliass for it, even if only for internal resolution.

TALK ABOUT THE SUCK.

----------

