3 Commits
v.0.2 ... v.0.6

Author SHA1 Message Date
ludovic.diemert
e2434ee93c pxe 2021-09-16 16:09:48 +02:00
Ludovic Diemert
474fbcba2c script recup 2021-09-15 11:00:00 +02:00
Ludovic Diemert
d8badd2870 lb 2021-09-15 10:52:39 +02:00
11 changed files with 40 additions and 91 deletions

View File

@@ -1,11 +0,0 @@
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

View File

@@ -1,20 +0,0 @@
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//zone directe
zone "domaine.lan" {
type master;
file "/etc/bind/db.domaine.lan";
};
//zone inverse
zone "1.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.domaine.lan.rev";
};

View File

@@ -1,3 +0,0 @@
domain domaine.lan
search domaine.lan
nameserver 127.0.0.1

View File

@@ -1,23 +0,0 @@
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "domaine.lan" {
type slave;
file "/etc/bind/db.domaine.lan";
masters {192.168.0.20; };
masterfile-format text;
};
//zone inverse
zone "1.168.192.in-addr.arpa" {
type slave;
notify no;
file "/etc/bind/db.domaine.lan.rev";
masters {192.168.0.20; };
};

View File

@@ -1,4 +0,0 @@
domain sio.lan
search sio.lan
nameserver 192.168.0.1
nameserver 10.121.38.7

5
sio2/sisr/05-lb/lvs Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
ipvsadm -A -t 192.168.0.150:80 -s rr
ipvsadm -a -t 192.168.0.150:80 -r 172.16.0.1:80 -m
ipvsadm -a -t 192.168.0.150:80 -r 172.16.0.2:80 -m

5
sio2/sisr/05-lb/recup Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
while [ TRUE ]
do
curl -s http://192.168.0.150 -o /dev/null
done

View File

@@ -40,19 +40,21 @@ ddns-update-style none;
# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.
#subnet 10.254.239.32 netmask 255.255.255.224 {
#subnet 192.168.1.1 netmask 255.255.255.0 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.20 192.168.1.40;
option domain-name-servers 192.168.0.1;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
filename "pxelinux.0";
next-server 192.168.1.1;
}
# default-lease-time 600;
# max-lease-time 7200;
#}
@@ -105,25 +107,3 @@ ddns-update-style none;
# range 10.0.29.10 10.0.29.230;
# }
#}
# Exmple de /etc/dhcp/dhcpd.conf
default-lease-time 604800; # durée du bail en secondes
max-lease-time 604800; # durée du bail en secondes
option domain-name-servers 192.168.0.1; # adr. des serveurs DNS
option netbios-name-servers 192.168.2.1; # adr. du serveur WINS
option netbios-node-type 8; # type de noeud NetBios (WINS puis broadcast)
subnet 192.168.2.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0; # masque de sous-réseau
option broadcast-address 192.168.2.255; # adresse de broadcast
range 192.168.2.10 192.168.2.20; # plage d'adresse
option routers 192.168.2.1; # passerelle par defaut
}
host xp-dhcp {
hardware ethernet 08:00:27:77:70:0D;
fixed-address 192.168.1.101;
}

View File

@@ -0,0 +1,17 @@
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp0s3
iface enp0s3 inet dhcp
allow-hotplug enp0s8
iface enp0s8 inet static
address 192.168.1.1/24
up /root/nat.sh

View File

@@ -15,4 +15,4 @@ DHCPDv4_PID=/var/run/dhcpd.pid
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="enp0s8"
#INTERFACESv6=""
INTERFACESv6=""

3
sio2/sisr/15-pxe/nat.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE