Click to See Complete Forum and Search --> : DNS works in LAN not from internet


storya
11-23-2003, 07:13 PM
I may have stuffed myself trying to setup BIND 3 different ways.

First some background:
I have a static IP, and an ISP who is going to play secondary DNS to my Master. I tried to setup the domains I want to host as being mastered on one Redhat 9.0 Server. (my main DNS is hosted at a third party as we needed to be online for at least one domain)
What i have done:
1. I tried using the redhat-config-bind utility -- couldn't even get it to work locally
2. tried webmin -- same deal
3. Read the webmin manual (rtfm i know) got it to work a little for the server
4. having read one manual downloaded the HOWTO from the linux documentation project and typed my settings in -- worked fine in the server but failed fom a windows box on the lan
5. tried to see if redhat-config-bind showed up anything i missed (what i missed was that by using the redhat config tool it replaces the files) so with the know-how from the rtfm I re-entered my domains. Now it works from server & windows LAN machienes (who previously couldn't get nslookup to return info even when told to use the redhat box as the server)
6. Stumped as now while it works great on the LAN no-one on the internet can resolve my hosts.

I have the portforwarding on my firewall setup to direct port 53 (DNS) to the linux server and the linux server has that port open as well. IS there any other ports that the DNS system uses? the LAN working and the Internet not kinda hints to me that it could be a firewall issue. But if anyone can detect a possible cause in these config flaws i (and anyone who has a similar problem) would be in your debt.

my /etc/named.conf

## named.conf - configuration for bind
#
# Generated automatically by redhat-config-bind, alchemist et al.
# Any changes not supported by redhat-config-bind should be put
# in /etc/named.custom
#
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

include "/etc/named.custom";

include "/etc/rndc.key";

zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "333.222.111.in-addr.arpa" {
type master;
file "333.222.111.in-addr.arpa.zone";
};


zone "localhost" {
type master;
file "localhost.zone";
};
zone "mydomain.com" {
type master;
file "mydomain.com.zone";
};
zone "anotherdomain.com" {
type master;
file "anotherdomain.com.zone";
};
zone "yetanotherdomain.net.au" {
type master;
file "yetanotherdomain.net.au.zone";
};

my /var/named/mydomain.com.zone (the others are identical bar the domain name)

$TTL 86400
@ IN SOA ns1.mydomain.com. aaron.mydomain.com. (
20031130 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)


IN NS 111.222.333.444
IN NS ns2.veritel.com.au.

@ IN MX 10 mail.mydomain.com.

IN A 111.222.333.444
mail IN A 111.222.333.444
ns1 IN A 111.222.333.444

www IN CNAME mydomain.com.

cowanrl
11-23-2003, 08:50 PM
It looks to me like your problem is your are passing TCP port 53 through your firewall but not UDP port 53.

I can resolve names from your DNS server with nslookup using TCP but not UDP(the default). If you're not familiar with this in nslookup, execute "set vc" from the nslookup command prompt, then try to resolve names. To turn it off, just execute "set novc".

You need to configure your router to also allow UDP port 53 through to your server also.

storya
11-24-2003, 04:04 AM
WooHoo!!!
:D:D:D:D:D:D:D
thanks heaps cowanrl. took like 45seconds from when i opened the UDP for it to work internet-wise.

Legendary!!

PM me if you ever need a slave DNS server in Australia, its not reliable yet or fast but it would be free :)

Thanks Again.

storya
11-24-2003, 06:12 AM
to protect the innocent i have been advised to change the domain names and IP addresses.

This will prevent any accidental copying into a live environment.

I changed the domains and the ip address and hopefuly is still useful. If anyone wants the originals PM me and i will send them on. but it should just be a matter of changeing 111.222.333.444 to your IP address and mydomain.com etc to your own domain.

cowanrl
11-24-2003, 07:55 AM
You're welcome.

I'm in the process of setting up my first DNS servers accessible from the Internet. The oppurtunity to look at others named.conf files is always helpful.
Your real IP addresses and domain names are not necessary to help me. They were helpfu however, in confirming that your problem was the UDP port 53 issue. I suspected it though as soon as I read your post.