Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

named; how to make my box a relay for other dns servers?

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
invictus
n00b
n00b
Posts: 26
Joined: Fri Jan 09, 2004 3:45 pm

named; how to make my box a relay for other dns servers?

  • Quote

Post by invictus » Sat Jan 10, 2004 3:49 pm

I am using my box as a gateway to the internet. Before I started using gentoo I used named to make my box act like a dns/name server that again use other dns servers. The problem is that I cant get it to work in gentoo. I have the dns servers defined in resolv.conf, and named is running, but my machine cant resolv websites.
Last edited by invictus on Sat Jan 10, 2004 6:00 pm, edited 1 time in total.
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Sat Jan 10, 2004 3:59 pm

1. the gentoo box has to use itself exclusively for DNS requests, i.e. only the box's LAN IP in resolv.conf
2. every machine points to the gentoo box (but that was the easy part ;-)
3. open up named.conf and set the following:

Code: Select all

forward first;
forwarders { ip.ad.dr.ess; ip.ad.dr.ess; };
Now you're good to go.

(If you only want to forward requests, you might easier run nscd than bind - bind is pure overkill for such a setup)
Top
invictus
n00b
n00b
Posts: 26
Joined: Fri Jan 09, 2004 3:45 pm

  • Quote

Post by invictus » Sat Jan 10, 2004 4:20 pm

1) didnt quite understand this...
2) done
3) isnt it possible to make named use the addresses in resolv.conf?
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Sat Jan 10, 2004 4:27 pm

1. What is so hard to understand ?

If you want to use the gentoo box as a "real" DNS server (real to your clients), you have to enter only its own IP address in resolv.conf.
Any additional addresses may cause it to skip it's own nameserver and go directly to those other nameservers.

Code: Select all

domain whatever.youlike
nameserver 127.0.0.1
2. obviously ;-)

3. No.
Top
invictus
n00b
n00b
Posts: 26
Joined: Fri Jan 09, 2004 3:45 pm

  • Quote

Post by invictus » Sat Jan 10, 2004 4:43 pm

Well I did as you said, and here is the result:

* Stopping named... [ !! ]

* WARNING: "named" has already been started.

Now I am really confused...doesnt work either
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Sat Jan 10, 2004 4:49 pm

invictus wrote:Well I did as you said,
Obviously not - read on...
invictus wrote:and here is the result:
* Stopping named... [ !! ]
* WARNING: "named" has already been started.

Now I am really confused...doesnt work either
What doesn't work ?
I never told you to restart named, how to do that should be in the docs.

First, to make named re-read its config files you do *not* restart named - you run:

Code: Select all

rndc reload
And wait a bit...

Second - why do you say anything went wrong ?
You tried restarting named - without mentioning how - and it failed.
Nothing in there has any bearing on what I told you.

Start by telling exactly what you did that caused this, and we'll see...
Top
daha
n00b
n00b
User avatar
Posts: 62
Joined: Sat Aug 23, 2003 7:50 pm
Location: Helsinki/EU

  • Quote

Post by daha » Sat Jan 10, 2004 4:49 pm

something has failed, and you have to use that "zap" handle to take this service down manually. actually it's already down, but this is just one of those nasty bugs :-]
/etc/init.d/servicename zap
Top
invictus
n00b
n00b
Posts: 26
Joined: Fri Jan 09, 2004 3:45 pm

  • Quote

Post by invictus » Sat Jan 10, 2004 4:57 pm

Sorry for not being as good at this. Well to make it easier I will paste the config files here so you can see for your self if I did as you told me, or if I have done something wrong.

named.conf;

options {
directory "/var/bind";

// uncomment the following lines to turn on DNS forwarding,
// and change the forwarind ip address(es) :
forward first;
forwarders {
128.39.140.7;
128.39.143.2;
};

listen-on-v6 { none; };
listen-on { 192.168.0.1; };

// to allow only specific hosts to use the DNS server:
//allow-query {
// 127.0.0.1;
//};

// if you have problems and are behind a firewall:
//query-source address * port 53;
pid-file "/var/run/named/named.pid";
};

zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};

zone "127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};


resolv.conf;

domain hig.no
nameserver 127.0.0.1
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Sat Jan 10, 2004 5:05 pm

That all looks fine, but you probably didn't understand me - I never told you about restarting the named server, or anything else, yet you report a restart error as if it was part of my advice/instructions.
It wasn't - plain and simple.
Top
invictus
n00b
n00b
Posts: 26
Joined: Fri Jan 09, 2004 3:45 pm

  • Quote

Post by invictus » Sat Jan 10, 2004 5:25 pm

yes, sorry about that...thought it was needed.

anyway; it works now on all other computers than the box itself.
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Sat Jan 10, 2004 5:31 pm

Get rid of the "listen_on" line - it doesn't actually listen to 127.0.0.1, or, alternatively (and more cleanly) change the 127.0.0.1 in resolv.conf to the LAN IP address.
Top
invictus
n00b
n00b
Posts: 26
Joined: Fri Jan 09, 2004 3:45 pm

  • Quote

Post by invictus » Sat Jan 10, 2004 5:35 pm

great! it works now. thank you so much for all your help and patience :)
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Sat Jan 10, 2004 5:55 pm

Patience? ME ?
Hmm can't say as I've noticed...;-)
Top
Post Reply

13 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic