|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
dhcpd and dns
Hi.
My openbsd machine is firewall/gateway and dhcp server for other computers at my office. Now the computers uses ISP dns for resolving hostnames, but i'd like them to use my openbsd for name resolving. So i can change "option domain-name-servers dns.of.my.isp;" to "option domain-name-servers 192.168.1.1;", which is the address of openbsd internal interface, but that's not enough, though. Is there something i'm missing in resolv.conf, or i just have to run named for such intentions? Thanks. |
|
|||
Hm, but it doesn't..
There's mine: Code:
shared-network LOCAL-NET { option domain-name "my.hostname.it"; option domain-name-servers 192.168.1.1; subnet 192.168.1.0 netmask 255.255.255.240 { option routers 192.168.1.1; range 192.168.1.2 192.168.1.14; default-lease-time 86400; #24h max-lease-time 172800; #48h } } |
|
|||
It's ok with clients configuration, i mean client gets 192.168.1.1 as dns server. The problem is the server doesn't resolves hostnames. I mean server it self doesn't work as resolver...
|
|
|||
You'll need to configure a recursive DNS server like BIND.. or something similar from the ports tree.
|
|
|||
I thought so, so i've started bind with default configuration adding only one line to named.conf
Code:
forwarders { dns.of.my.isp; }; Code:
May 7 11:59:54 myhostname named[27303]: client 192.168.1.6#1026: RFC 1918 response from Internet for 6.1.168.192.in-addr.arpa May 7 12:45:35 myhostname named[27303]: client 192.168.1.5#1025: RFC 1918 response from Internet for 5.1.168.192.in-addr.arpa |
|
|||
BIND is forwarding the lookup of IN-ADDR.ARPA zones to your ISP's DNS server, this isn't the proper way of doing it.
You can create your own master zone to get around this, /var/named/etc/named.conf Code:
... zone "1.168.192.in-addr.arpa" { type master; file "master/1.168.192.in-addr.arpa"; }; Code:
$ORIGIN 1.168.192.in-addr.arpa. $TTL 24h @ IN SOA mydomain. root.localhost. ( 2009050801 ; serial 8h ; refresh 2h ; retry 10d ; expiration 24h ) ; minimum NS mydomain. 1 IN PTR myhostname.mydomain. 5 IN PTR clienthost1.mydomain. 6 IN PTR clienthost2.mydomain. |
|
|||
Brilliant. Thank you, this is absolutely what i needed.
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dhcpd, vista and wlan | hamba | FreeBSD Ports and Packages | 5 | 8th September 2009 04:34 PM |
dhcpd and multiple subnets | vdubjunkie | OpenBSD General | 5 | 11th March 2009 11:02 PM |
dhcpd within ezjail? | zelut | FreeBSD General | 7 | 10th February 2009 10:31 PM |
dhcpd:No Buffer space avaible | marsjanq | OpenBSD General | 8 | 13th September 2008 07:52 PM |
dhcpd problems... dynamic and static leases present | edhunter | FreeBSD General | 7 | 16th May 2008 02:34 PM |