Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-28-2004, 02:30 AM
|
#1
|
LQ Newbie
Registered: Aug 2004
Posts: 6
Rep:
|
named.conf ... acl syntax
Hi,
Newbie here, 2 days on Redhat 9. Tripping along thru the docs (  ) , got DHCP up, and DNS 95%, NAT is next.
Can anyone pls tell me the proper syntax of 'acl' so I get my DNS running properly? I am using acl statements to limit access to the zones on my DNS server. What is the proper syntax to refer to all possible externals IPs?
acl internals { 192.168.1.0/24; 127.0.0.0/24; };
acl externals { ?????? };
Currently I have only my ISP's DNS servers, and a friend's DNS in my acl externals statement. So only they can get queries and transfers from the relevant zone on my DNS. I want to be able to answer everyone's DNS requests about my Domain Name.
Thanks Much,
Al
PS - Sorry if this is already covered elsewhere here ... YOU =>  , ME =>
If it hasn't already been covered ... YOU =>  , ME => 
|
|
|
08-28-2004, 02:43 AM
|
#2
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
acl in named.conf ?? i didnt heard anything like this b4.
bind allows everybody to use your nameserver to resolve domain names. also it answers every query if your domain records are asked .
check your firewall. maybe it blocks the queries.
Last edited by maxut; 08-28-2004 at 02:45 AM.
|
|
|
08-28-2004, 02:55 AM
|
#3
|
LQ Newbie
Registered: Aug 2004
Posts: 6
Original Poster
Rep:
|
Here are some logs from /var/log/messages
Aug 28 01:43:07 teclis named[2833]: client w.x.y.z#3398: query 'blah.com/IN' denied
Aug 28 01:43:07 teclis named[2833]: client w.x.y.z#3399: query 'blah.com/IN' denied
named is blocking it. It is the acl statements, bcs my ISP DNS couldn't connect until I added them. It makes it easy to prevent inside LAN type info/stuff going out to an external request.
I just need the syntax of the IP '/'-notation for all addresses. Or the notation of a range (incase acl doesn't allow overlaps).
I am still tweaking things ... and so at this time the firewall is fully off.
|
|
|
08-28-2004, 02:59 AM
|
#4
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
try this:
zone "blah.com" IN {
type master;
file "blah.com.zone";
allow-update { w.x.y.z; };
let me know if it fixed please.
|
|
|
08-28-2004, 03:02 AM
|
#5
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
by the way, it seems that client w.x.y.z wants to update zone file of "blah.com". do u have secondary nameserver at w.x.y.z ?
|
|
|
08-28-2004, 03:07 AM
|
#6
|
LQ Newbie
Registered: Aug 2004
Posts: 6
Original Poster
Rep:
|
I am already doing that, and those specifically listed IPs work. I need the syntax used to include all IPs total just like 192.168.1.0/24 is used to specify all IPs from 192.168.1.0 thru 192.168.1.255.
here is part if my named.conf:
acl externals { external IP1; external IP2; ISP DNS IP1; ISP DNS IP2; ISP DNS IP3; };
acl internals { 192.168.1.0/24; 127.0.0.0/24; };
options {
directory "/var/named/";
pid-file "named.pid";
query-source address * port 53;
forward only;
forwarders { ISP DNS IP1; ISP DNS IP2; IPS DNS IP3; };
allow-transfer { none; };
allow-query { internals; externals; };
allow-recursion { internals; };
};
zone "0.0.127.in-addr.arpa" {
type master;
file "localhost.zone";
allow-query { internals; };
allow-transfer { internals; };
notify no;
};
zone "blah.com" {
type master;
file "blah.com.zone";
forwarders { };
allow-query { internals; externals; };
allow-transfer { internals; };
};
|
|
|
08-28-2004, 03:10 AM
|
#7
|
LQ Newbie
Registered: Aug 2004
Posts: 6
Original Poster
Rep:
|
sorry ... wasn't specific enough
w.x.y.z could be anyone on the internet. A DNS server out there trying to get the info about my domain name.
|
|
|
08-28-2004, 03:28 AM
|
#8
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
hmmm.
zone "blah.com" {
type master;
file "blah.com.zone";
forwarders { };
allow-query { internals; externals; };
allow-transfer { internals; };
};
i think the trouble is
allow-transfer { internals; };
let everybody to transfer your zone file. i am not sure but i think this is necessary to publish "blah.com" . and by the deafult it allows everybody.
if u change
options{
..
forward only;
to
forward first;
your nameserver caching will run. so it wont ask every query to your ISP nameserver.
|
|
|
08-28-2004, 03:45 AM
|
#9
|
LQ Newbie
Registered: Aug 2004
Posts: 6
Original Poster
Rep:
|
thx for the tip on the forwarding!!
exactly ... I want everyone to able go get access to that zone. I have added 'external' to 'allow transfers'. Thx
The problem is that I need to declare 'externals' to be all IPs ... ie 0.0.0.0 to 255.255.255.255, or 0.0.0.0 to 192.168.0.255 and 192.168.2.0 to 255.255.255.255 (if BIND doesn't handle overlaps in acl statements too well).
|
|
|
08-28-2004, 03:52 AM
|
#10
|
Member
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104
Rep:
|
hi,
you probably want to use the predefined 'any' acl if you are hosting the domain and want anybody to be able request resource records for it :
zone "blah.com" {
type master;
file "blah.com.zone";
allow-query { any; };
allow-transfer { internals; };
};
allow-transfer is only really useful for secondary (type slave  nameservers so they can transfer the zone off your primary - I'd set it to :
allow-transfer { none; };
... try making use of the predefined acl's if they already do what you need them to - makes your config a little cleaner :
[from http://www.zytrax.com/books/dns/ch7/acl.html ]
* "none" - matches no hosts
* "any" - matches all hosts
* "localhost" - matches all the IP address(es) of the server on which BIND is running
* "localnets" - matches all the IP address(es) and subnetmasks of the server on which BIND is running
Not sure how 'localnets' is affected if you are running a PPP/IPPP/TUN adapter etc - haven't ever used it with dynamic interfaces.
hope that helped.
Last edited by angrybeaver; 08-28-2004 at 03:54 AM.
|
|
1 members found this post helpful.
|
08-28-2004, 03:56 AM
|
#11
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
dont declare acl for allow-transfers. just remove the "allow-transfers" lines
in "options { ..." section, and in "zone "blah.com" {..." section.
bind will allow everybody to transfer zone files by default.
u can also block unwanted net activity with iptables . u dont have to configure named acl's.
|
|
|
08-28-2004, 03:57 AM
|
#12
|
LQ Newbie
Registered: Aug 2004
Posts: 6
Original Poster
Rep:
|
BINGO!!!
I was trying 'all' and named wouldn't start. The prospect of putting in { 0.0.0.0/8; 1.0.0.0/8 ... 255.0.0.0/8 } was just down right scary.
thx for the secondary/transfer tip too!
THANKS MUCH!!!
|
|
|
08-28-2004, 08:05 AM
|
#13
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
by the way, knowledge is not far from u. it already comes with linux  check the man pages of named for more detail about configuration.
man named
man named.conf
|
|
|
All times are GMT -5. The time now is 05:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|