dhcp
This commit is contained in:
parent
5574bf5194
commit
2cff7379a6
2 changed files with 21 additions and 0 deletions
17
installation/dhcp.sh
Normal file
17
installation/dhcp.sh
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y isc-dhcp-server
|
||||||
|
|
||||||
|
config=\
|
||||||
|
"default-lease-time 600; \
|
||||||
|
max-lease-time 7200; \
|
||||||
|
\
|
||||||
|
subnet 192.168.1.0 netmask 255.255.255.0 { \
|
||||||
|
range 192.168.1.10 192.168.1.100; \
|
||||||
|
option routers 192.168.1.1; \
|
||||||
|
option subnet-mask 255.255.255.0; \
|
||||||
|
option domain-name-servers 8.8.8.8, 8.8.4.4; \
|
||||||
|
}"
|
||||||
|
|
||||||
|
echo "$config" | sudo tee /etc/dhcp/dhcpd.conf >/dev/null
|
4
installation/utils.sh
Normal file
4
installation/utils.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y curl
|
Loading…
Reference in a new issue