Results 1 to 5 of 5
Hi,
Is there any problem for BIND that i don't have a /24 class of ip addresses?
I mean i have only one IP address. How do i define the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-08-2007 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 20
question on BIND
Hi,
Is there any problem for BIND that i don't have a /24 class of ip addresses?
I mean i have only one IP address. How do i define the address to host mapping file?
Lets say my ip is 192.168.1.1 and i have db.192.168.1 zone file :
$TTL 3h
1.168.192.in-addr.arpa. IN SOA dns.somedomain.org. hostmaster.somedomain.org.(
1 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 hour
;
; Name servers
;
1.168.192.in-addr.arpa. IN NS dns.somedomain.org.
;
; Addresses point to canonical name
;
1.1.168.192.in-addr.arpa. IN PTR dns.somedomain.org.
Is this ok? Will this work?
P.S. just ignore the private ip - its for demo purpose only, i have a routable ipLast edited by OTIM; 11-08-2007 at 11:37 AM. Reason: i double checked my post and modified the SOA according to NS and PTR
- 11-08-2007 #2I would suggest that you buy a book on DNS, maybe this one:Code:
$TTL 3h 1.168.192.in-addr.arpa IN SOA dns.somedomain.org. hostmaster.somedomain.org.( 1 ; Serial 3h ; Refresh after 3 hours 1h ; Retry after 1 hour 1w ; Expire after 1 week 1h ) ; Negative caching TTL of 1 hour ; ; Name servers ; 1 NS dns.somedomain.org. $ORIGIN 1.168.192.in-addr.arpa. ; ; Addresses point to canonical name ; 1 PTR dns.somedomain.org.
oreilly.com -- Online Catalog: DNS and BIND, Fourth Edition
and understand what DNS does and how to configure it especially if you are going to make this server public access!!
- 11-12-2007 #3Just Joined!
- Join Date
- Sep 2007
- Posts
- 20
Yupii i made it work

No i don't want to make it public it is just for me, for study purposes.
So here is my config, perhaps it might help someone someday, who knows
named.conf
db.127.0.0options {
directory "/var/named";
pid-file "named.pid";
allow-recursion { 192.168.0/24; } ;
listen-on { 192.168.0/24; } ;
version none;
allow-query { 192.168.0/24; } ;
allow-transfer { 192.168.0/24; } ;
};
zone "ovidiu.org" in {
type master;
file "db.ovidiu.org";
} ;
zone "0.168.192.in-addr.arpa" in {
type master;
file "db.192.168.0";
} ;
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
} ;
zone "." in {
type hint;
file "root.zone";
} ;
db.192.168.0$TTL 24h
0.0.127.in-addr.arpa. IN SOA serverx.ovidiu.org. serverx.ovidiu.org. (
1 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 hour
0.0.127.in-addr.arpa. IN NS serverx.ovidiu.org.
1.0.0.127.in-addr.arpa. IN PTR localhost.
db.ovidiu.org$TTL 3h
0.168.192.in-addr.arpa. IN SOA serverx.ovidiu.org. hostmaster.ovidiu.org. (
1 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 hour
0.168.192.in-addr.arpa. IN NS serverx.ovidiu.org.
1.0.168.192.in-addr.arpa. IN PTR serverx.ovidiu.org.
10.0.168.192.in-addr.arpa. IN PTR anisoara.ovidiu.org.
Yes i know it can be improved, but for now i'm happy because it works$TTL 3h
$ORIGIN ovidiu.org.
;
;SOA record
;
ovidiu.org. IN SOA serverx.ovidiu.org. hostmaster.ovidiu.org. (
1 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 hour
;
;NS records
;
ovidiu.org. IN NS serverx.ovidiu.org.
;
;A records
;
localhost IN A 127.0.0.1
serverx IN A 192.168.0.1
anisoara IN A 192.168.0.10
;
;CNAME records
;
ratisoara IN CNAME anisoara
- 11-12-2007 #4
Cool!! Maybe sometime in the future you'll play with it some more.
- 11-12-2007 #5Just Joined!
- Join Date
- Sep 2007
- Posts
- 20
thanks

After some reading on internet and on forums it seems there is a mistake in my config.
So, what i did was this: deleted
and added in named.conf:zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
} ;
with the zone files:zone "localhost" in {
type master;
file "master.localhost";
allow-update {none;};
};
zone "0.0.127.IN-ADDR.ARPA" in{
type master;
file "localhost.rev";
allow-update{none;};
When i do "nslookup localhost" i get :$TTL 1d ;
$ORIGIN localhost.
localhost. IN SOA localhost. root.localhost. (
2002022401 ; serial
3H ; refresh
15M ; retry
1w ; expire
3h ; minimum
)
localhost. IN NS localhost. ; localhost is the name server
localhost. IN A 127.0.0.1 ; the loop-back address
$TTL 86400 ; 24 hours
$ORIGIN 0.0.127.IN-ADDR.ARPA.
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
3h ; Refresh
15 ; Retry
1w ; Expire
3h ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
Name: localhost.ovidiu.org
Address: 127.0.0.1
My question is, if someone is kind to explain why do i need this?
I know that 127.0.0.1 is the loopback address and it is a way that the computer refers to itself.


Reply With Quote
