mirror of
https://github.com/mainnika/openwrt-feed-coredns.git
synced 2026-06-22 12:44:58 +00:00
Compare commits
2 Commits
4a28f02407
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| be41f62051 | |||
|
5f6c86549d
|
@@ -2,9 +2,19 @@
|
|||||||
|
|
||||||
This is an openwrt feed that contains definitions to include CoreDNS software into your OpenWRT build.
|
This is an openwrt feed that contains definitions to include CoreDNS software into your OpenWRT build.
|
||||||
|
|
||||||
## how to add the feed into your build
|
## install from a binary
|
||||||
|
|
||||||
> see for details: https://openwrt.org/docs/guide-developer/feeds
|
### by using terminal
|
||||||
|
1. download an ipk file from the releases page https://code.tokarch.uk/mainnika/openwrt-feed-coredns/releases
|
||||||
|
2. put the file to the device, e.g. path `/tmp/coredns.ipk` use scp -- `scp coredns_1.8.6-1_arm_cortex-a7_neon-vfpv4.ipk root@[openwrt-ip]:/tmp/coredns.ipk`
|
||||||
|
2. use opkg to install the downloaded file, e.g. `opkg install /tmp/coredns.ipk`
|
||||||
|
|
||||||
|
### by using luci
|
||||||
|
1. download an ipk file from the releases page https://code.tokarch.uk/mainnika/openwrt-feed-coredns/releases
|
||||||
|
2. open luci admin gui and go `System` → `Software`
|
||||||
|
3. use `Upload Package` buttom to upload local release file
|
||||||
|
|
||||||
|
## how to add the feed into your build
|
||||||
|
|
||||||
1. open your feeds.conf.default and add the following line:
|
1. open your feeds.conf.default and add the following line:
|
||||||
|
|
||||||
@@ -18,6 +28,8 @@ This is an openwrt feed that contains definitions to include CoreDNS software in
|
|||||||
|
|
||||||
`./scripts/feeds install -a -p feed_coredns`
|
`./scripts/feeds install -a -p feed_coredns`
|
||||||
|
|
||||||
|
> see for details: https://openwrt.org/docs/guide-developer/feeds
|
||||||
|
|
||||||
## service init
|
## service init
|
||||||
|
|
||||||
The package setups an init script `/etc/init.d/coredns` and uci config section:
|
The package setups an init script `/etc/init.d/coredns` and uci config section:
|
||||||
@@ -43,3 +55,23 @@ The empty `Corefile`:
|
|||||||
. { }
|
. { }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To configure the coredns instance properly set Corefile with your content.
|
||||||
|
|
||||||
|
## use cases
|
||||||
|
|
||||||
|
### openwrt hardware as the external dns resolver
|
||||||
|
|
||||||
|
> I assume that in this setup openwrt act as a dhcp client (not a server).
|
||||||
|
> You can set lan network as a dhcp client by using these uci values (use `uci commit` to apply):
|
||||||
|
> ```
|
||||||
|
> uci del network.lan.ipaddr
|
||||||
|
> uci del network.lan.netmask
|
||||||
|
> uci del network.lan.ip6assign
|
||||||
|
> uci set network.lan.proto='dhcp'
|
||||||
|
> ```
|
||||||
|
|
||||||
|
the main goal is to replace `dnsmasq` with `coredns` because they share the same port `53`.
|
||||||
|
|
||||||
|
1. go `System` → `Startup`, disable and stop `dnsmasq`
|
||||||
|
2. enable and start `coredns`
|
||||||
|
3. now coredns acts as a default resolver and listen all interfaces by default.
|
||||||
|
|||||||
Reference in New Issue
Block a user