Passer au contenu principal

Config réseau

DHCP

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp-server/dhcpd.conf.example
#   see dhcpd.conf(5) man page
#
# OpenNIC DNS

option domain-name-servers 10.10.10.10,8, 1.1.1.1;
option subnet-mask 255.255.255.0;
option routers 10.10.10.1;
subnet 10.10.10.0 netmask 255.255.255.0 {
        range 10.10.10.20 10.10.10.250;

        host livebox{
                hardware ethernet a4:3e:51:3e:62:15;
                fixed-address 10.10.10.1;
        }

        host picsou{
                hardware ethernet 4c:cc:6a:fc:0f:28;
                fixed-address 10.10.10.11;
        }

        host eve{winnie{
                hardware ethernet e4:b3:18:8c:c8:96;
                fixed-address 10.10.10.12;
        }

        host cri-kee{
                hardware ethernet 14:9f:3c:6b:9e:2b;
                fixed-address 10.10.10.13;
        }

        host evewifi{
                hardware ethernet b8:27:eb:6a:de:01;3f:8b:54;
                fixed-address 10.10.10.9;
        }

        host totoro{
                hardware ethernet 08:be:ac:03:29:09;
                fixed-address 10.10.10.200;
        }

        
host

chihiro{ hardware ethernet 24:62:AB:07:1B:6E; fixed-address 10.10.10.211; } } ## DNS

/etc/sysconfig/network-scripts/ifcfg-enp1s0 :

#

Configured via Pi-hole installer

DEVICE=enp1s0 BOOTPROTO=none ONBOOT=yes IPADDR=10.10.10.10 GATEWAY=10.10.10.1 DNS1=10.10.10.10 DNS2=208.67.220.220 NETMASK=255.255.255.0 USERCTL=no


/etc/unbound/conf.d/external-dns.conf :

forward-zone: name: "." forward-addr: 172.104.136.243 forward-addr: 192.71.245.208


/etc/unbound/unbound.conf :

view: name: "home" include: /etc/unbound/local.d/home.conf


/etc/unbound/local.d/home.conf :

#

entries in this file override toe global DNS

#

#

Example blocking email going out to example.com

#

#

local-data: "example.com. 3600 IN MX 5 127.0.0.1"

#

local-data: "example.com. 3600 IN A 127.0.0.1"

local-data: "wall-e.home. 3600 IN A 10.10.10.10" local-data: "password.home. 3600 IN A 10.10.10.10" local-data: "eve.home. 3600 IN A 10.10.10.9"

#

This can also be done dynamically using: unbound-control local-data [...]

#

For more complicated redirection, use conf.d/ with stub-add: or forward-add: