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.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 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: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.243208.67.222.222
forward-addr: 192.71.245.208208.67.220.220

/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.musique.home.      3600 IN A 10.10.10.10"
local-data: "photo.home.        3600 IN A 10.10.10.10"
local-data: "music.home.        3600 IN A 10.10.10.10"
local-data: "electric.home.     3600 IN A 10.10.10.8"

local-data: "money.home.     3600 IN A 10.10.10.8"

local-data: "eve.home.          3600 IN A 10.10.10.9"
#local-data: This"voice.home.        can3600 alsoIN beA done dynamically using: unbound-control10.10.10.9"

local-datadata: [...]"chihiro.home.      #3600 ForIN moreA complicated10.10.10.211"
redirection,local-data: use"totoro.home.       conf.d/3600 withIN stub-add:A or forward-add:10.10.10.200"

/etc/unbound/local.d/adServers.conf

https://pgl.yoyo.org/adservers/serverlist.php?hostformat=unbound&showintro=0&mimetype=plaintext

/etc/unbound/local.d/interface.conf

interface: 10.10.10.8
access-control: 10.10.10.1/24 allow

Network Manager

/etc/NetworkManager/system-connections/Clochette\ 1.nmconnection

[connection]
id=Clochette 1
uuid=79af5700-b779-46b6-a8db-698531d0e9b7
type=wifi
interface-name=wlp3s0f3u2u2
timestamp=1682974157

[wifi]
mode=infrastructure
ssid=Clochette

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=foretdesrevesbleus

[ipv4]
address1=10.10.10.8/24,10.10.10.1
dns=1.1.1.1;
method=manual

[ipv6]
addr-gen-mode=default
method=auto

[proxy]

nmcli connection mod "Clochette 1" connection.autoconnect yes