Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

third example configuration file #19

Open
hannesm opened this issue Oct 28, 2024 · 0 comments
Open

third example configuration file #19

hannesm opened this issue Oct 28, 2024 · 0 comments

Comments

@hannesm
Copy link
Contributor

hannesm commented Oct 28, 2024

from https://docs.fedoraproject.org/en-US/fedora-server/administration/dnsmasq/

 # /etc/NetworkManager/dnsmasq.d/01-DNS-example-lan.conf
 # This file sets up DNS for the private local net domain example.lan
 local=/example.lan/
 # file where to find the list of IP - hostname mapping
 addn-hosts=/etc/dnsmasq.hosts

 domain-needed
 bogus-priv

 # Automatically add <domain> to simple names in a hosts-file.
 expand-hosts

 # interfaces to listen on
 interface=lo
 interface=enp2s0
 # in case of a bridge don't use the attached server virtual ethernet interface

 # The below defines a Wildcard DNS Entry.
 #address=/.localnet/10.10.10.zzz

 # Upstream public net DNS server (max.three)
 no-poll
 server=134.102.xx.yy
 server=134.102.uu.vv
 server=2001:638:xxx:yyy::zz

## Configuration of the DHCP service for the private network (example.lan)</p>
 # etc/NetworkManager/dnsmasq.d/02-DHCP-example-lan.conf
 # This file sets up DHCP for the private local net domain example.lan

 # The domain the DHCP part of dnsmasq is responsible for:
 domain=example.lan,10.10.10.0/24,local

 # interfaces to listen on
 interface=enp2s0

 # general DHCP stuff (options, see RFC 2132)
 # 1: subnet masq
 # 3: default router
 # 6: DNS server
 # 12: hostname
 # 15: DNS domain (unneeded with option 'domain')
 # 28: broadcast address

 dhcp-authoritative
 dhcp-option=1,255.255.255.0
 dhcp-option=3,10.10.10.10
 dhcp-option=6,10.10.10.1

 # Assign fixed IP addresses based on MAC address
 # dhcp-host=00:1a:64:ce:89:4a,NAME01,10.10.10.50,infinite
 # dhcp-host=52:54:00:42:6a:43,NAME02,10.10.10.51,infinite

 # Assign dynamically IP addresses to interface to listen on
 # Range for distributed addresses, tagged &lt;int&gt; for further references dhcp-range=tag:enp2s0,10.10.10.150,10.10.10.200,24h

### Configuration of the DHCP service for the public network (example.com)</p>
 # etc/NetworkManager/dnsmasq.d/03-DHCP-example-com.conf
 # This file sets up DNCP for the public example.com domain interface

 # The domain the DHCP part of dnsmasq is responsible for:
 domain=example.com,134.102.xx.yy/27

 # interfaces to listen on
 interface=enp1s0

 # general DHCP stuff (options, see RFC 2132)
 # 1: subnet masq
 # 3: default router
 # 6: DNS server
 # 12: hostname
 # 15: DNS domain (unneeded with option 'domain')
 # 28: broadcast address

 ##dhcp-authoritative
 ## we just send the bare minimum, e.g. no DNS server
 ##dhcp-option=1,255.255.255.224
 dhcp-option=tag:enp1s0,option=router,134.102.3.30

 # Assign fixed IP addresses based on MAC address
 # dhcp-host=00:1a:64:ce:89:4a,thootes,10.10.10.50,infinite
 # dhcp-host=52:54:00:42:6a:43,apollon,10.10.10.51,infinite
 # Assign dynamically IP addresses to interface to listen on
 # Range for distributed addresses, tagged &lt;int&gt; for further references dhcp-range=tag:enp1s0,134.102.3.19,134.102.3.26,1h
reynir added a commit that referenced this issue Dec 11, 2024
The examples are from the example configs in #17 and #19 as well as the
dnsmasq.conf.example distributed with Dnsmasq version 2.89
reynir added a commit that referenced this issue Dec 12, 2024
The examples are from the example configs in #17 and #19 as well as the
dnsmasq.conf.example distributed with Dnsmasq version 2.89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant