1

Temat: ustawienie DNS w DHCP

Cześć.
Chciałbym skonfigurować openwrt aby użytkownikom łączących się do sieci, podczas przydzielania adresu IP był przydzielany konkretny, zdefiniowany adres IP serwera DNS.
Czytalem, próbowałem ale coś nie wychodzi.
Może ktoś podpowiedzieć, jak to poprawnie skonfigurować?

2

Odp: ustawienie DNS w DHCP

A czytałeś to:
https://eko.one.pl/?p=openwrt-dns

Korzystam z: MF286D; Kernel 6.12.60 r32225 i AW1000; Kernel 6.12.94 r35323
Wypełnij ankietę. Poprawiamy tłumaczenie LuCI. Szczegóły w tym poście

3

Odp: ustawienie DNS w DHCP

Tak

4

Odp: ustawienie DNS w DHCP

pokaż:
uci show dhcp

Korzystam z: MF286D; Kernel 6.12.60 r32225 i AW1000; Kernel 6.12.94 r35323
Wypełnij ankietę. Poprawiamy tłumaczenie LuCI. Szczegóły w tym poście

5

Odp: ustawienie DNS w DHCP

root@cyb-rt:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].ednspacket_max='1232'
dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
dhcp.@dnsmasq[0].logqueries='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='2m' - to specjalnie na testy
dhcp.lan.dhcpv4='server'
dhcp.lan.dhcp_option='6,192.168.1.110' '6,192.168.1.1'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
dhcp.guest=dhcp
dhcp.guest.start='100'
dhcp.guest.limit='150'
dhcp.guest.leasetime='2h'
dhcp.guest.interface='guest'
root@cyb-rt:~#

6

Odp: ustawienie DNS w DHCP

Źle ustawiłeś. To jedna opcja

list dhcp_option '6,192.168.1.110,192.168.1.1'

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7

Odp: ustawienie DNS w DHCP

wiem właśnie. Jak wykonałem to polecenie, to zmieniłem jak napisałeś i jest ok.
Dzieki. Jak zawsze pierdoła smile