Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2434ee93c | ||
|
|
474fbcba2c | ||
|
|
d8badd2870 | ||
|
|
4a9c538bff | ||
|
|
e264b4cd7b |
5
sio2/sisr/05-lb/lvs
Executable file
5
sio2/sisr/05-lb/lvs
Executable 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
5
sio2/sisr/05-lb/recup
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
while [ TRUE ]
|
||||
do
|
||||
curl -s http://192.168.0.150 -o /dev/null
|
||||
done
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
17
sio2/sisr/15-pxe/interfaces
Normal file
17
sio2/sisr/15-pxe/interfaces
Normal 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
|
||||
@@ -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
3
sio2/sisr/15-pxe/nat.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
echo "1" > /proc/sys/net/ipv4/ip_forward
|
||||
iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE
|
||||
Reference in New Issue
Block a user