Przykłady plików konfiguracyjnych:
Źródła:
https://linoxide.com/linux-how-to/install-configure-dhcp-ubuntu/
https://filipczyk.net/konfiguracja-routingu-serwera-dhcp-ubuntudebian/
http://geek-admin.blogspot.com/2012/12/dhcp-automatyczne-przydzielanie-adresu.html
- /etc/network/interfaces
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp
# Druga karta sieciowa dla LAN
auto enp0s8
iface enp0s8 inet static
address 192.168.100.1
netmask 255.255.255.0 - /etc/dhcp/dhcpd.conf
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
option domain-name-servers 192.168.6.1, 8.8.8.8;
authoritative;
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.100 192.168.100.200;
option broadcast-address 192.168.100.255;
option routers 192.168.100.1;
host Mariusz {
hardware ethernet 00:1f:29:02:04:34;
fixed-address 192.168.100.200;
}
host Window7 {
hardware ethernet 08:00:27:74:ff:b7;
fixed-address 192.168.100.150;
} - /etc/rc.local
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -d 0.0.0.0/0 -j MASQUERADE
exit 0 - /etc/sysctl.conf
net.ipv4.ip_forward=1
Źródła:
https://linoxide.com/linux-how-to/install-configure-dhcp-ubuntu/
https://filipczyk.net/konfiguracja-routingu-serwera-dhcp-ubuntudebian/
http://geek-admin.blogspot.com/2012/12/dhcp-automatyczne-przydzielanie-adresu.html