0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenWrtのuciでは直接設定できないdnsmasq.confの項目を外付けファイルで設定する方法

Posted at

本題

必要な設定項目を記述したファイルを以下のパスに作成したとする。

/root/etc/dnsmasq.conf

/etc/config/dhcpのconfig dnsmasqに以下の2行を追加する。

list addnmount '/root/etc/dnsmasq.conf'
option extraconftext 'conf-file=/root/etc/dnsmasq.conf'

おまけ

項目を一つ追加するだけなら以下で十分。

option extraconftext 'key=value'

extraconftextで複数の項目を追加するなら以下でも可能。

option extraconftext 'key1=value1\nkey2=value2\n...'

数が多いと扱いにくい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?