dhcp test 1
This commit is contained in:
parent
9695b09087
commit
f8fc6da54c
4 changed files with 18 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
"repositories": [],
|
||||
"replace_repositories": "False",
|
||||
"keyrings": [],
|
||||
"packages": "nginx grub-pc linux-image-amd64 docker.io make curl openssl nano",
|
||||
"packages": "nginx grub-pc linux-image-amd64 docker.io make curl openssl nano isc-dhcp-server",
|
||||
"create_ca": "True",
|
||||
"preinstall_scripts": [
|
||||
"configs/scripts/ca.sh"
|
||||
|
|
|
@ -21,3 +21,11 @@ while true; do
|
|||
break
|
||||
fi
|
||||
done
|
||||
|
||||
ip addr flush dev eth0
|
||||
ip addr add 192.168.1.1/24 dev eth0
|
||||
|
||||
echo -e "\nauto eth0\niface eth0 inet static\n address 192.168.1.1\n netmask 255.255.255.0\n gateway 192.168.1.1" | tee -a /etc/network/interfaces
|
||||
|
||||
cp dhcpd.conf /etc/dhcp/dhcpd.conf
|
||||
sed -i 's/^INTERFACES=.*/INTERFACES="eth0"/' /etc/default/isc-dhcp-server
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"repositories": [],
|
||||
"replace_repositories": "False",
|
||||
"keyrings": [],
|
||||
"packages": "nginx grub-pc linux-image-generic docker.io make curl openssl nano",
|
||||
"packages": "nginx grub-pc linux-image-generic docker.io make curl openssl nano isc-dhcp-server",
|
||||
"create_ca": "True",
|
||||
"preinstall_scripts": [
|
||||
"configs/scripts/ca.sh"
|
||||
|
@ -17,6 +17,7 @@
|
|||
],
|
||||
"package_manager": "apt",
|
||||
"extra_files": [
|
||||
"resources/dhcpd.conf",
|
||||
"downloads/deployment.tar.gz"
|
||||
]
|
||||
}
|
7
resources/dhcpd.conf
Normal file
7
resources/dhcpd.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
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 192.168.1.1;
|
||||
option domain-name "interstellarnet.com";
|
||||
}
|
Loading…
Reference in a new issue