Skip to main content

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, 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{
                hardware ethernet b8:27:eb:6a:de:01;
                fixed-address 10.10.10.9;
        }


}

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: