Compare commits
No commits in common. "master" and "main" have entirely different histories.
6
README.md
Normal file
6
README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# siotp
|
||||
|
||||
Dépôt de suivi des fichiers de configuration réalisés au cours du BTS SIO
|
||||
|
||||
**sisr1** : enseignement SISR, première année
|
||||
|
110
css/style.css
110
css/style.css
@ -1,110 +0,0 @@
|
||||
@-webkit-keyframes showwindow {
|
||||
0% {
|
||||
object-position: top;
|
||||
}
|
||||
50% {
|
||||
object-position: bottom;
|
||||
}
|
||||
100% {
|
||||
object-position: top;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes showwindow {
|
||||
0% {
|
||||
-o-object-position: top;
|
||||
object-position: top;
|
||||
}
|
||||
50% {
|
||||
-o-object-position: bottom;
|
||||
object-position: bottom;
|
||||
}
|
||||
100% {
|
||||
-o-object-position: top;
|
||||
object-position: top;
|
||||
}
|
||||
}
|
||||
|
||||
.dot-effect {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.dot-effect::before {
|
||||
content: "";
|
||||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dot" viewBox="0 0 16 16"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/></svg>');
|
||||
background-position: 0% 0%;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
opacity: 0.2;
|
||||
top: 40px;
|
||||
right: 40px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h2.dot-effect {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
h2.dot-effect::before {
|
||||
content: "";
|
||||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dot" viewBox="0 0 16 16"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/></svg>');
|
||||
background-position: top;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
opacity: 0.2;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
height: 80%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.carousel .carousel-item {
|
||||
position: relative;
|
||||
z-index: 15;
|
||||
}
|
||||
|
||||
.carousel .carousel-item::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 16;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.carousel * {
|
||||
z-index: 17;
|
||||
}
|
||||
|
||||
.img-cover {
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.card img.card-img-top {
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
height: 400px;
|
||||
-o-object-position: top;
|
||||
object-position: top;
|
||||
}
|
||||
|
||||
.card img.card-img-top:hover {
|
||||
-webkit-animation: showwindow 3s infinite;
|
||||
animation: showwindow 3s infinite;
|
||||
}
|
||||
|
||||
.card img.card-img-top:hover.mobile-view {
|
||||
-webkit-animation: showwindow 12s infinite;
|
||||
animation: showwindow 12s infinite;
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><g class="" style="" transform="translate(0,1)"><path d="M182.78 80.125c3.367 19.498 10.608 52.67 19.126 84.813 8.126 30.663 17.73 60.122 25.063 75.062 57.968-.962 148.212-16.707 252.343-46.344-91.756-70.023-188.486-99.376-296.532-113.53zM164.657 85c-65.62 51.243-106.43 120.106-138.5 196.25 54.866-38.51 111.644-60.42 169.313-70.906-3.995-12.636-7.88-26.486-11.626-40.625-8.425-31.79-15.554-64.12-19.188-84.72zm322.281 125.906c-74.123 21.218-141.43 35.68-196.25 42.813 24.018 51.794 36.448 106.688 43.688 160.936 70.634-58.76 125.36-118.495 152.563-203.75zM201.53 228.28c-56.563 9.917-111.78 30.946-165.56 68.907 89.478 61.396 189.91 97.037 279.874 119.844-7.362-55.057-20.104-109.997-44.75-161.03-18.39 1.897-35.134 2.875-49.938 2.875h-5.344l-2.718-4.625c-3.898-6.69-7.77-15.598-11.563-25.97z" fill="#0d6efd" fill-opacity="1"></path></g></svg>
|
Before Width: | Height: | Size: 944 B |
BIN
img/portrait.jpg
BIN
img/portrait.jpg
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
BIN
img/profil.jpg
BIN
img/profil.jpg
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
442
index.html
442
index.html
@ -1,442 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Modèle - Portfolio</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.4/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-DQvkBjpPgn7RC31MCQoOeC9TI2kdqa4+BSgNMNj8v77fdC77Kj5zpWFTJaaAoMbC" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="py-4">
|
||||
<nav class="navbar navbar-expand-md fixed-top navbar-light bg-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand text-uppercase fw-bold" href="#">
|
||||
<span class="bg-primary bg-gradient p-1 rounded-3 text-light">Jérémy Thomas</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#me">Qui suis-je ?</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#portfolio">Portfolio</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
|
||||
<!-- A propos de vous -->
|
||||
<div class="container">
|
||||
<section id="me">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<h1 >Je suis Quelqu'un, </h1>
|
||||
<h2 >en formation pour devenir administrateur systèmes et réseaux</h2>
|
||||
<a href="#competences">Mes compétences</a>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<img src="./img/profil.jpg" alt="Jérémy Thomas" width="50%" >
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- Votre portfolio -->
|
||||
<div class="container">
|
||||
<section id="portfolio" >
|
||||
<div>
|
||||
<h2>Mon portfolio</h2>
|
||||
<h3>Projets perso et pro</h3>
|
||||
|
||||
<div class="row gy-4 gy-md-0 mt-4">
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="card">
|
||||
<img src="img/shéma GSB.png" class="card-img-top" alt="...">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Projet GSB</h5>
|
||||
<p class="card-text">Conception d'un shéma réseau d'une infrastructure lors du projet</p>
|
||||
<a class="btn btn-primary" data-bs-toggle="offcanvas" data-bs-target="#infoProjet1"
|
||||
aria-controls="infoProjet1">En savoir plus</a>
|
||||
</div>
|
||||
<div class="offcanvas offcanvas-bottom h-100" tabindex="-1" id="infoProjet1"
|
||||
aria-labelledby="titelProjet1">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="titelProjet1">Projet GSB</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<!-- Carousel -->
|
||||
<div id="carouselProject1" class="carousel slide shadow h-100" data-bs-ride="carousel"
|
||||
data-bs-touch="true">
|
||||
<div class="carousel-inner h-100">
|
||||
<div class="carousel-item h-100 active" data-bs-interval="10000">
|
||||
<img src="img/shéma GSB.png" class="d-block w-100" alt="Image slide 1">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 1</h5>
|
||||
<p>Shéma réseau de l'entreprise GSB.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
||||
<img src="https://picsum.photos/1920/1080?random=2" class="d-block w-100" alt="Image slide 2">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 2</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100">
|
||||
<img src="https://picsum.photos/1920/1080?random=3" class="d-block w-100" alt="Image slide 3">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 3</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselProject1"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carouselProject1"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="card">
|
||||
<img src="https://picsum.photos/300/150?random=2" class="card-img-top" alt="...">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Projet 2</h5>
|
||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
<a class="btn btn-primary" data-bs-toggle="offcanvas" data-bs-target="#infoProjet2"
|
||||
aria-controls="infoProjet2">En savoir plus</a>
|
||||
</div>
|
||||
<div class="offcanvas offcanvas-bottom h-100" tabindex="-1" id="infoProjet2"
|
||||
aria-labelledby="titelProjet2">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="titelProjet1">Projet 2</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<!-- Carousel -->
|
||||
<div id="carouselProject2" class="carousel slide shadow h-100" data-bs-ride="carousel"
|
||||
data-bs-touch="true">
|
||||
<div class="carousel-inner h-100">
|
||||
<div class="carousel-item h-100 active" data-bs-interval="10000">
|
||||
<img src="https://picsum.photos/1920/1080?random=4" class="d-block w-100" alt="Image slide 1">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 1</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
||||
<img src="https://picsum.photos/1920/1080?random=5" class="d-block w-100" alt="Image slide 2">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 2</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100">
|
||||
<img src="https://picsum.photos/1920/1080?random=6" class="d-block w-100" alt="Image slide 3">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 3</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselProject2"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carouselProject2"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="card">
|
||||
<img src="https://picsum.photos/300/150?random=3" class="card-img-top" alt="...">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Projet 3</h5>
|
||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
<a class="btn btn-primary" data-bs-toggle="offcanvas" data-bs-target="#infoProjet3"
|
||||
aria-controls="infoProjet3">En savoir plus</a>
|
||||
</div>
|
||||
<div class="offcanvas offcanvas-bottom h-100" tabindex="-1" id="infoProjet3"
|
||||
aria-labelledby="titelProjet3">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="titelProjet1">Projet 3</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<!-- Carousel -->
|
||||
<div id="carouselProject3" class="carousel slide shadow h-100" data-bs-ride="carousel"
|
||||
data-bs-touch="true">
|
||||
<div class="carousel-inner h-100">
|
||||
<div class="carousel-item h-100 active" data-bs-interval="10000">
|
||||
<img src="https://picsum.photos/1920/1080?random=7" class="d-block w-100" alt="Image slide 1">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 1</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
||||
<img src="https://picsum.photos/1920/1080?random=8" class="d-block w-100" alt="Image slide 2">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 2</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100">
|
||||
<img src="https://picsum.photos/1920/1080?random=9" class="d-block w-100" alt="Image slide 3">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 3</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselProject3"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carouselProject3"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="card">
|
||||
<img src="https://picsum.photos/300/150?random=4" class="card-img-top" alt="...">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Projet 4</h5>
|
||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
<a class="btn btn-primary" data-bs-toggle="offcanvas" data-bs-target="#infoProjet4"
|
||||
aria-controls="infoProjet4">En savoir plus</a>
|
||||
</div>
|
||||
<div class="offcanvas offcanvas-bottom h-100" tabindex="-1" id="infoProjet4"
|
||||
aria-labelledby="titelProjet4">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="titelProjet1">Projet 4</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<!-- Carousel -->
|
||||
<div id="carouselProject4" class="carousel slide shadow h-100" data-bs-ride="carousel"
|
||||
data-bs-touch="true">
|
||||
<div class="carousel-inner h-100">
|
||||
<div class="carousel-item h-100 active" data-bs-interval="10000">
|
||||
<img src="https://picsum.photos/1920/1080?random=10" class="d-block w-100" alt="Image slide 1">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 1</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
||||
<img src="https://picsum.photos/1920/1080?random=11" class="d-block w-100" alt="Image slide 2">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 2</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item h-100">
|
||||
<img src="https://picsum.photos/1920/1080?random=12" class="d-block w-100" alt="Image slide 3">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Slide 3</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
|
||||
sollicitudin.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselProject4"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carouselProject4"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- Partie contact -->
|
||||
<div class="container">
|
||||
<section id="contact">
|
||||
<div class="row">
|
||||
<h2>Un projet de création web ?</h2>
|
||||
<h3>Discutons-en !</h3>
|
||||
|
||||
<div class="col-4">
|
||||
<img src="./img/envelope.svg" alt="Image d'une enveloppe" width="100%" >
|
||||
</div>
|
||||
<div class="col-1"></div>
|
||||
<div class="col-7">
|
||||
<!-- Formulaire -->
|
||||
<form action="contact.php" method="POST">
|
||||
<div>
|
||||
<label for="firstname" >Prénom</label>
|
||||
<input name="firstname" type="text" class="form-control" id="firstname">
|
||||
</div>
|
||||
<div>
|
||||
<label for="name" >Nom</label>
|
||||
<input name="name" type="text" class="form-control" id="name">
|
||||
</div>
|
||||
<div >
|
||||
<label for="email" >Email address</label>
|
||||
<input name="email" type="email" class="form-control" id="email">
|
||||
</div>
|
||||
<div>
|
||||
<label for="message" >Message</label>
|
||||
<textarea name="message" class="form-control" id="message" rows="3"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" >Envoyer</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<footer class="border-top">
|
||||
<div class="container py-5">
|
||||
<div class="row gy-4 align-items-center">
|
||||
<div class="col-12 col-md-4">
|
||||
<a class="navbar-brand text-dark text-uppercase fw-bold" href="#">
|
||||
<span class="bg-primary bg-gradient p-1 rounded-3 text-light">Jérémy Thomas</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-md-center">
|
||||
<ul class="list-unstyled mb-0">
|
||||
<li>
|
||||
<a href="#" class="text-decoration-none text-dark" data-bs-toggle="modal"
|
||||
data-bs-target="#mentionsLegales">Mentions légales</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-md-end">
|
||||
<ul class="list-inline mb-0">
|
||||
<li class="list-inline-item">
|
||||
<a href="#" class="text-decoration-none text-dark" data-bs-toggle="tooltip" title="LinkedIn">
|
||||
<i class="fab fa-linkedin fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#" class="text-decoration-none text-dark" data-bs-toggle="tooltip" title="Instagram">
|
||||
<i class="fab fa-instagram-square fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#" class="text-decoration-none text-dark" data-bs-toggle="tooltip" title="Twitter">
|
||||
<i class="fab fa-twitter-square fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="mentionsLegales" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Mentions Légales</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tellus leo, volutpat vitae
|
||||
mi
|
||||
ultrices,
|
||||
sollicitudin
|
||||
blandit dui. Mauris ultricies iaculis leo id consequat. Class aptent taciti sociosqu ad
|
||||
litora
|
||||
torquent
|
||||
per conubia
|
||||
nostra, per inceptos himenaeos. Sed posuere risus viverra ornare porttitor. Nullam egestas
|
||||
nec
|
||||
libero eget
|
||||
sagittis.
|
||||
Phasellus vulputate ante a vulputate vehicula. Suspendisse nec dolor ante.
|
||||
</p>
|
||||
<p>
|
||||
Nunc auctor semper turpis. Duis quam velit, aliquam ut mi vel, sollicitudin dapibus erat.
|
||||
Etiam
|
||||
vitae
|
||||
malesuada urna.
|
||||
Vestibulum scelerisque lacus at molestie cursus. Donec placerat enim id enim feugiat
|
||||
gravida.
|
||||
Integer ut
|
||||
maximus libero.
|
||||
Nulla faucibus dolor vitae varius rutrum. Nunc neque sem, convallis id lorem quis, vulputate
|
||||
imperdiet
|
||||
eros. Donec
|
||||
viverra commodo congue.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.4/dist/js/bootstrap.bundle.min.js" integrity="sha384-YUe2LzesAfftltw+PEaao2tjU/QATaW/rOitAq67e0CT0Zi2VVRL0oC4+gAaeBKu" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
40
sisr-qj/qj09/get_last_connexion.sh
Normal file
40
sisr-qj/qj09/get_last_connexion.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Affectation du nom d'utilisateur passé en paramètre à la variable "username"
|
||||
#[...]
|
||||
username=$1
|
||||
# extraction de la ligne correspondante du fichier de logs
|
||||
user_line=$(grep $username ./logs_access.txt)
|
||||
# Création d'une variable comprenant les groupes recherchés
|
||||
groups=""
|
||||
# Vérification de la présence du groupe sudo -> ajout de la fonction "administrateur" à $groups
|
||||
if [[ $(echo $user_line | grep "sudo") != "" ]] ; then
|
||||
groups=$groups" administrateur "
|
||||
fi
|
||||
# Vérification de la présence du groupe slam -> ajout de la fonction "développeur" à $groups
|
||||
#[...]
|
||||
if [[ $(echo $user_line | grep "slam") != "" ]] ; then
|
||||
groups=$groups" développeur "
|
||||
fi
|
||||
# Vérification de la présence du groupe sisr -> ajout de la fonction "technicien" à $groups
|
||||
#[...]
|
||||
if [[ $(echo $user_line | grep "sisr") != "" ]] ; then
|
||||
groups=$groups" technicien "
|
||||
fi
|
||||
# récupération du champ date + temps
|
||||
date_time=$(echo $user_line | cut -d ":" -f4)
|
||||
# récupération des champs dates (format US) et temps dans deux variables distinctes
|
||||
date_us=$(echo $date_time | cut -d "_" -f1)
|
||||
#[...]
|
||||
time_us=$(echo $date_time | cut -d "_" -f2)
|
||||
# extraction de chaque information utile de ces champs
|
||||
day=$(echo $date_us | cut -d "/" -f3)
|
||||
month=$(echo $date_us | cut -d "/" -f2)
|
||||
#[...]
|
||||
year=$(echo $date_us | cut -d "/" -f1)
|
||||
hours=$(echo $time_us | cut -d "-" -f1)
|
||||
min=$(echo $time_us | cut -d "-" -f2)
|
||||
sec=$(echo $time_us | cut -d "-" -f3)
|
||||
# affichage du message
|
||||
#[...]
|
||||
echo "L'utilisateur $username est membre de(s) groupe(s) $groups et sa dernière connexion remonte au $day/$month/$year à $hours h $min min et $sec sec."
|
5
sisr-qj/qj09/logs_access.txt
Normal file
5
sisr-qj/qj09/logs_access.txt
Normal file
@ -0,0 +1,5 @@
|
||||
admin:1000:users,sudo:24/10/07_21-41-28
|
||||
jibril:1001:users,eleves_sio,slam:24/09/29_07-46-51
|
||||
lea:1002:users,sudo,sisr:24/12/14_18-31-27
|
||||
mona:1003:users,eleves_sio,sisr:24/10/05_15-30-23
|
||||
luc:1004:users,eleves_sio,slam:24/10/02_12-14-50
|
12
sisr1/QJ10.sh
Normal file
12
sisr1/QJ10.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
filename=squid.conf # nom du fichier
|
||||
filepath=/etc/squid # emplacement du fichier
|
||||
servicename=squid.service # nom du service
|
||||
|
||||
git pull # mise à jour du fichier de config du dépôt
|
||||
|
||||
sudo cp $filepath/$filename $filepath/$filename.old # sauvegarde fichier précédent
|
||||
sudo cp ./$filename $filename/$filename # copie du fichier de config mis à jour son emplacement
|
||||
|
||||
sudo systemctl restart $servicename # redémarrage du service associé
|
19
sisr1/README.md
Normal file
19
sisr1/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# sisr1
|
||||
|
||||
Travaux pratiques de première année : option SISR
|
||||
|
||||
**- tp01-nat-dhcp** :
|
||||
* configuration de base d'un serveur DHCP Debian
|
||||
* configuration simple d'un routeur NAT sous Debian avec **nftables**
|
||||
|
||||
**- tp02-dns** :
|
||||
* configuration de serveurs DNS primaires et secondaires
|
||||
* configuration du service DHCP pour utiliser ces DNS
|
||||
* automatisation du lancement du script NAT
|
||||
|
||||
**- tp03-reseau-privee** :
|
||||
* configuration de serveurs DNS primaires et secondaires
|
||||
* configuration du service DHCP pour utiliser ces DNS
|
||||
* connexion ssh sur srv-admin puis sur les VMs besoins
|
||||
|
||||
# plage d'adresse personnelle: 192.168.0.140 à 192.168.0.159
|
7
sisr1/tp01-nat-dhcp/README.md
Normal file
7
sisr1/tp01-nat-dhcp/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# tp01-nat-dhcp
|
||||
|
||||
|
||||
* configuration de base d'un serveur DHCP Debian
|
||||
* configuration simple d'un routeur NAT sous Debian avec **nftables**
|
||||
* fichiers de configuration des cartes réseau du routeur
|
||||
|
2
sisr1/tp01-nat-dhcp/cartes_reseau/README.md
Normal file
2
sisr1/tp01-nat-dhcp/cartes_reseau/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
* **interfaces** :
|
||||
* fichier de configuration des interfaces réseau : /etc/network/interfaces
|
24
sisr1/tp01-nat-dhcp/cartes_reseau/interfaces
Normal file
24
sisr1/tp01-nat-dhcp/cartes_reseau/interfaces
Normal file
@ -0,0 +1,24 @@
|
||||
# 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
|
||||
|
||||
# Assignation static IP adresse
|
||||
# auto enp0s3
|
||||
# iface enp0s3 inet static
|
||||
# address 192.168.0.26/24
|
||||
# gateway 192.168.0.1
|
||||
|
||||
# Assignation static IP adresse
|
||||
auto enp0s8
|
||||
iface enp0s8 inet static
|
||||
address 192.168.2.1/24
|
||||
# gateway 192.168.0.1
|
3
sisr1/tp01-nat-dhcp/nat/README.md
Normal file
3
sisr1/tp01-nat-dhcp/nat/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
* **nat.sh** : script activant la NAT dynamique sans filtrage
|
||||
* A placer à /root/nat.sh
|
||||
* Rendre exécutable : <code>chmod +x /root/nat.sh</code>
|
6
sisr1/tp01-nat-dhcp/nat/nat.sh
Normal file
6
sisr1/tp01-nat-dhcp/nat/nat.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
echo "1" > /proc/sys/net/ipv4/ip_forward
|
||||
nft add table basic_nat_table
|
||||
nft add chain basic_nat_table prerouting {type nat hook prerouting priority 0 \; }
|
||||
nft add chain basic_nat_table postrouting {type nat hook postrouting priority 0 \; }
|
||||
nft add rule basic_nat_table postrouting masquerade
|
6
sisr1/tp01-nat-dhcp/srv-dhcp/README.md
Normal file
6
sisr1/tp01-nat-dhcp/srv-dhcp/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
* **dhcpd.conf** :
|
||||
* configuration du service DHCP (isc-dhcp-server)
|
||||
* se trouve sur le serveur : /etc/dhcp/dhcpd.conf
|
||||
* **isc-dhcp-server** :
|
||||
* paramètre les interfaces réseau du serveur configurées pour servir le service DHCP
|
||||
* se trouve sur le serveur : /etc/default/isc-dhcp-server
|
107
sisr1/tp01-nat-dhcp/srv-dhcp/dhcpd.conf
Normal file
107
sisr1/tp01-nat-dhcp/srv-dhcp/dhcpd.conf
Normal file
@ -0,0 +1,107 @@
|
||||
# dhcpd.conf
|
||||
#
|
||||
# Sample configuration file for ISC dhcpd
|
||||
#
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
option domain-name "example.org";
|
||||
option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 3600;
|
||||
max-lease-time 604800;
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
ddns-update-style none;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
#log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
subnet 192.168.2.0 netmask 255.255.255.0 {
|
||||
range 192.168.2.10 192.168.2.100;
|
||||
option routers 192.168.2.1;
|
||||
option domain-name-servers 10.121.38.7;
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
}
|
||||
# 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 {
|
||||
# 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;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration.
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.example.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
host fantasia {
|
||||
hardware ethernet 08:00:27:77:70:0d;
|
||||
fixed-address 192.168.2.102;
|
||||
}
|
||||
|
||||
# You can declare a class of clients and then do address allocation
|
||||
# based on that. The example below shows a case where all clients
|
||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
||||
# other clients get addresses on the 10.0.29/24 subnet.
|
||||
|
||||
#class "foo" {
|
||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
||||
#}
|
||||
|
||||
#shared-network 224-29 {
|
||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-224.example.org;
|
||||
# }
|
||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-29.example.org;
|
||||
# }
|
||||
# pool {
|
||||
# allow members of "foo";
|
||||
# range 10.17.224.10 10.17.224.250;
|
||||
# }
|
||||
# pool {
|
||||
# deny members of "foo";
|
||||
# range 10.0.29.10 10.0.29.230;
|
||||
# }
|
||||
#}
|
18
sisr1/tp01-nat-dhcp/srv-dhcp/isc-dhcp-server
Normal file
18
sisr1/tp01-nat-dhcp/srv-dhcp/isc-dhcp-server
Normal file
@ -0,0 +1,18 @@
|
||||
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
|
||||
|
||||
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
|
||||
#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
|
||||
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
|
||||
|
||||
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
|
||||
#DHCPDv4_PID=/var/run/dhcpd.pid
|
||||
#DHCPDv6_PID=/var/run/dhcpd6.pid
|
||||
|
||||
# Additional options to start dhcpd with.
|
||||
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
|
||||
#OPTIONS=""
|
||||
|
||||
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
|
||||
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
|
||||
INTERFACESv4="enp0s8"
|
||||
INTERFACESv6=""
|
109
sisr1/tp02-dns/dhcp/dhcpd.conf
Normal file
109
sisr1/tp02-dns/dhcp/dhcpd.conf
Normal file
@ -0,0 +1,109 @@
|
||||
# dhcpd.conf
|
||||
#
|
||||
# Sample configuration file for ISC dhcpd
|
||||
#
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
option domain-name "example.org";
|
||||
option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 3600;
|
||||
max-lease-time 604800;
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
ddns-update-style none;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
#log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
subnet 192.168.2.0 netmask 255.255.255.0 {
|
||||
range 192.168.2.10 192.168.2.100;
|
||||
option routers 192.168.2.1;
|
||||
option domain-name-servers 192.168.0.141;
|
||||
option domain-name "dns1-jt.sio-jt.lan";
|
||||
}
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
|
||||
# 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 {
|
||||
# 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;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration.
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.example.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
host fantasia {
|
||||
hardware ethernet 08:00:27:77:70:0d;
|
||||
fixed-address 192.168.2.102;
|
||||
}
|
||||
|
||||
# You can declare a class of clients and then do address allocation
|
||||
# based on that. The example below shows a case where all clients
|
||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
||||
# other clients get addresses on the 10.0.29/24 subnet.
|
||||
|
||||
#class "foo" {
|
||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
||||
#}
|
||||
|
||||
#shared-network 224-29 {
|
||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-224.example.org;
|
||||
# }
|
||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-29.example.org;
|
||||
# }
|
||||
# pool {
|
||||
# allow members of "foo";
|
||||
# range 10.17.224.10 10.17.224.250;
|
||||
# }
|
||||
# pool {
|
||||
# deny members of "foo";
|
||||
# range 10.0.29.10 10.0.29.230;
|
||||
# }
|
||||
#}
|
24
sisr1/tp02-dns/dns1/db.sio-jt.lan
Normal file
24
sisr1/tp02-dns/dns1/db.sio-jt.lan
Normal file
@ -0,0 +1,24 @@
|
||||
;
|
||||
; BIND data file for local loopback interface
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA dns1-jt.sio-jt.lan. root.dns1.sio-jt.lan. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
NS dns1-jt.sio-jt.lan.
|
||||
NS dns2-jt.sio-jt.lan.
|
||||
dns1-jt.sio-jt.lan. A 192.168.0.141
|
||||
dns2-jt.sio-jt.lan. A 192.168.0.142
|
||||
|
||||
@ IN NS localhost.
|
||||
;@ IN A 127.0.0.1
|
||||
|
||||
deb-dhcp-jt IN A 192.168.0.140
|
||||
|
||||
;@ IN AAAA ::1
|
||||
|
||||
dhcp CNAME deb-dhcp-jt.sio-jt.lan.
|
||||
dns CNAME dns1.sio-jt.lan.
|
18
sisr1/tp02-dns/dns1/db.sio-jt.lan.rev
Normal file
18
sisr1/tp02-dns/dns1/db.sio-jt.lan.rev
Normal file
@ -0,0 +1,18 @@
|
||||
;
|
||||
; BIND data file for local loopback interface
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA dns1-jt.sio-jt.lan. root.dns1-jt.sio-jt.lan. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
;
|
||||
IN NS dns1-jt.sio-jt.lan.
|
||||
IN NS dns2-jt.sio-jt.lan.
|
||||
|
||||
140 IN PTR deb-dhcp-jt.sio-jt.lan.
|
||||
141 IN PTR dns1-jt.sio-jt.lan.
|
||||
142 IN PTR dns2-jt.sio-jt.lan.
|
||||
|
24
sisr1/tp02-dns/dns1/named.conf.options
Normal file
24
sisr1/tp02-dns/dns1/named.conf.options
Normal file
@ -0,0 +1,24 @@
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
|
||||
// If there is a firewall between you and nameservers you want
|
||||
// to talk to, you may need to fix the firewall to allow multiple
|
||||
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
|
||||
|
||||
// If your ISP provided one or more IP addresses for stable
|
||||
// nameservers, you probably want to use them as forwarders.
|
||||
// Uncomment the following block, and insert the addresses replacing
|
||||
// the all-0's placeholder.
|
||||
|
||||
forwarders {
|
||||
10.121.38.7; //ici forwarder 1
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// If BIND logs error messages about the root key being expired,
|
||||
// you will need to update your keys. See https://www.isc.org/bind-keys
|
||||
//========================================================================
|
||||
dnssec-validation no;
|
||||
|
||||
listen-on-v6 { any; };
|
||||
};
|
18
sisr1/tp02-dns/dns2/db.sio-jt.lan
Normal file
18
sisr1/tp02-dns/dns2/db.sio-jt.lan
Normal file
@ -0,0 +1,18 @@
|
||||
$ORIGIN .
|
||||
$TTL 604800 ; 1 week
|
||||
sio-jt.lan IN SOA dns1-jt.sio-jt.lan. root.dns1.sio-jt.lan. (
|
||||
2 ; serial
|
||||
604800 ; refresh (1 week)
|
||||
86400 ; retry (1 day)
|
||||
2419200 ; expire (4 weeks)
|
||||
604800 ; minimum (1 week)
|
||||
)
|
||||
NS dns1-jt.sio-jt.lan.
|
||||
NS dns2-jt.sio-jt.lan.
|
||||
NS localhost.
|
||||
$ORIGIN sio-jt.lan.
|
||||
deb-dhcp-jt A 192.168.0.140
|
||||
dhcp CNAME deb-dhcp-jt
|
||||
dns CNAME dns1
|
||||
dns1-jt A 192.168.0.141
|
||||
dns2-jt A 192.168.0.142
|
15
sisr1/tp02-dns/dns2/db.sio-jt.lan.rev
Normal file
15
sisr1/tp02-dns/dns2/db.sio-jt.lan.rev
Normal file
@ -0,0 +1,15 @@
|
||||
$ORIGIN .
|
||||
$TTL 604800 ; 1 week
|
||||
0.168.192.in-addr.arpa IN SOA dns1-jt.sio-jt.lan. root.dns1-jt.sio-jt.lan. (
|
||||
2 ; serial
|
||||
604800 ; refresh (1 week)
|
||||
86400 ; retry (1 day)
|
||||
2419200 ; expire (4 weeks)
|
||||
604800 ; minimum (1 week)
|
||||
)
|
||||
NS dns1-jt.sio-jt.lan.
|
||||
NS dns2-jt.sio-jt.lan.
|
||||
$ORIGIN 0.168.192.in-addr.arpa.
|
||||
140 PTR deb-dhcp-jt.sio-jt.lan.
|
||||
141 PTR dns1-jt.sio-jt.lan.
|
||||
142 PTR dns2-jt.sio-jt.lan.
|
1
sisr1/tp02-dns/dns2/hostname
Normal file
1
sisr1/tp02-dns/dns2/hostname
Normal file
@ -0,0 +1 @@
|
||||
dns2-jt
|
7
sisr1/tp02-dns/dns2/hosts
Normal file
7
sisr1/tp02-dns/dns2/hosts
Normal file
@ -0,0 +1,7 @@
|
||||
127.0.0.1 localhost
|
||||
127.0.1.1 dns2-jt.sio-jt.lan dns2-jt
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
19
sisr1/tp02-dns/dns2/interfaces
Normal file
19
sisr1/tp02-dns/dns2/interfaces
Normal file
@ -0,0 +1,19 @@
|
||||
# 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
|
||||
|
||||
# Assignation static IP adresse
|
||||
auto enp0s3
|
||||
iface enp0s3 inet static
|
||||
address 192.168.0.142/24
|
||||
gateway 192.168.0.1
|
||||
|
25
sisr1/tp02-dns/dns2/named.conf.local
Normal file
25
sisr1/tp02-dns/dns2/named.conf.local
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// Do any local configuration here
|
||||
//
|
||||
|
||||
// zone directe
|
||||
zone "sio-jt.lan" {
|
||||
type slave;
|
||||
file "/etc/bind/db.sio-jt.lan";
|
||||
masters { 192.168.0.141; };
|
||||
masterfile-format text;
|
||||
};
|
||||
|
||||
// zone inverse
|
||||
zone "0.168.192.in-addr.arpa" {
|
||||
type slave;
|
||||
notify no;
|
||||
file "/etc/bind/db.sio-jt.lan.rev";
|
||||
masters { 192.168.0.141; };
|
||||
masterfile-format text;
|
||||
};
|
||||
|
||||
// Consider adding the 1918 zones here, if they are not used in your
|
||||
// organization
|
||||
//include "/etc/bind/zones.rfc1918";
|
||||
|
24
sisr1/tp02-dns/dns2/named.conf.options
Normal file
24
sisr1/tp02-dns/dns2/named.conf.options
Normal file
@ -0,0 +1,24 @@
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
|
||||
// If there is a firewall between you and nameservers you want
|
||||
// to talk to, you may need to fix the firewall to allow multiple
|
||||
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
|
||||
|
||||
// If your ISP provided one or more IP addresses for stable
|
||||
// nameservers, you probably want to use them as forwarders.
|
||||
// Uncomment the following block, and insert the addresses replacing
|
||||
// the all-0's placeholder.
|
||||
|
||||
forwarders {
|
||||
10.121.38.7; //ici forwarder 1
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// If BIND logs error messages about the root key being expired,
|
||||
// you will need to update your keys. See https://www.isc.org/bind-keys
|
||||
//========================================================================
|
||||
dnssec-validation no;
|
||||
|
||||
listen-on-v6 { any; };
|
||||
};
|
6
sisr1/tp02-dns/nat/README.md
Normal file
6
sisr1/tp02-dns/nat/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
* **nat.sh** : script activant la NAT dynamique sans filtrage
|
||||
* A placer à /root/nat.sh
|
||||
* Rendre exécutable : <code>chmod +x /root/nat.sh</code>
|
||||
* **nat.service** : service lançant le script au démarrage
|
||||
* A placer à /etc/systemd/system/nat.service
|
||||
* Activer le service : <code>systemctl enable nat.service</code>
|
13
sisr1/tp02-dns/nat/nat.service
Normal file
13
sisr1/tp02-dns/nat/nat.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
|
||||
Description=execute /root/nat.sh
|
||||
|
||||
After=default.target
|
||||
|
||||
[Service]
|
||||
|
||||
ExecStart=bash /root/nat.sh
|
||||
|
||||
[Install]
|
||||
|
||||
WantedBy=default.target
|
6
sisr1/tp02-dns/nat/nat.sh
Normal file
6
sisr1/tp02-dns/nat/nat.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
echo "1" > /proc/sys/net/ipv4/ip_forward
|
||||
nft add table basic_nat_table
|
||||
nft add chain basic_nat_table prerouting {type nat hook prerouting priority 0 \; }
|
||||
nft add chain basic_nat_table postrouting {type nat hook postrouting priority 0 \; }
|
||||
nft add rule basic_nat_table postrouting masquerade
|
24
sisr1/tp03-reseau-prive/srv-admin/cartes_reseau/interfaces
Normal file
24
sisr1/tp03-reseau-prive/srv-admin/cartes_reseau/interfaces
Normal file
@ -0,0 +1,24 @@
|
||||
# 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 static
|
||||
address 192.168.0.140/24
|
||||
gateway 192.168.0.1
|
||||
|
||||
# Assignation static IP adresse
|
||||
# auto enp0s3
|
||||
# iface enp0s3 inet static
|
||||
# address 192.168.0.26/24
|
||||
# gateway 192.168.0.1
|
||||
|
||||
# The seconary network interface
|
||||
auto enp0s8
|
||||
iface enp0s8 inet dhcp
|
6
sisr1/tp03-reseau-prive/srv-admin/nat/README.md
Normal file
6
sisr1/tp03-reseau-prive/srv-admin/nat/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
* **nat.sh** : script activant la NAT dynamique sans filtrage
|
||||
* A placer à /root/nat.sh
|
||||
* Rendre exécutable : <code>chmod +x /root/nat.sh</code>
|
||||
* **nat.service** : service lançant le script au démarrage
|
||||
* A placer à /etc/systemd/system/nat.service
|
||||
* Activer le service : <code>systemctl enable nat.service</code>
|
13
sisr1/tp03-reseau-prive/srv-admin/nat/nat.service
Normal file
13
sisr1/tp03-reseau-prive/srv-admin/nat/nat.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
|
||||
Description=execute /root/nat.sh
|
||||
|
||||
After=default.target
|
||||
|
||||
[Service]
|
||||
|
||||
ExecStart=bash /root/nat.sh
|
||||
|
||||
[Install]
|
||||
|
||||
WantedBy=default.target
|
6
sisr1/tp03-reseau-prive/srv-admin/nat/nat.sh
Normal file
6
sisr1/tp03-reseau-prive/srv-admin/nat/nat.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
echo "1" > /proc/sys/net/ipv4/ip_forward
|
||||
nft add table basic_nat_table
|
||||
nft add chain basic_nat_table prerouting {type nat hook prerouting priority 0 \; }
|
||||
nft add chain basic_nat_table postrouting {type nat hook postrouting priority 0 \; }
|
||||
nft add rule basic_nat_table postrouting masquerade
|
2
sisr1/tp03-reseau-prive/srv-dns2/README.md
Normal file
2
sisr1/tp03-reseau-prive/srv-dns2/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
**- fichier named.conf** :
|
||||
* les fichiers named.conf.local et named.conf.options sont récupérés du srv-service
|
18
sisr1/tp03-reseau-prive/srv-dns2/cartes_reseau/interfaces
Normal file
18
sisr1/tp03-reseau-prive/srv-dns2/cartes_reseau/interfaces
Normal file
@ -0,0 +1,18 @@
|
||||
# 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
|
||||
|
||||
# Assignation static IP adresse
|
||||
#auto enp0s3
|
||||
#iface enp0s3 inet static
|
||||
# address 172.16.0.200/24
|
||||
# gateway 172.16.0.1
|
28
sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan
Normal file
28
sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan
Normal file
@ -0,0 +1,28 @@
|
||||
;
|
||||
; BIND data file for local loopback interface
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
NS srv-service.monlabo.lan.
|
||||
NS srv-dns2.monlabo.lan.
|
||||
srv-service.monlabo.lan. A 172.16.0.254
|
||||
srv-dns2.monlabo.lan. A 172.16.0.253
|
||||
srv-admin-jt.monlabo.lan. A 172.16.0.1
|
||||
|
||||
srvdhcp IN CNAME srv-service.monlabo.lan.
|
||||
dhcp IN CNAME srv-service.monlabo.lan.
|
||||
srvdns IN CNAME srv-service.monlabo.lan.
|
||||
dns IN CNAME srv-service.monlabo.lan.
|
||||
srvdns1 IN CNAME srv-service.monlabo.lan.
|
||||
dns1 IN CNAME srv-service.monlabo.lan.
|
||||
srvdns2 IN CNAME srv-dns2.monlabo.lan.
|
||||
dns2 IN CNAME srv-dns2.monlabo.lan.
|
||||
srvadmin IN CNAME srv-admin-jt.monlabo.lan.
|
||||
router IN CNAME srv-admin-jt.monlabo.lan.
|
||||
gateway IN CNAME srv-admin-jt.monlabo.lan.
|
||||
|
26
sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan.rev
Normal file
26
sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan.rev
Normal file
@ -0,0 +1,26 @@
|
||||
$ORIGIN .
|
||||
$TTL 604800 ; 1 week
|
||||
0.16.172.in-addr.arpa IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. (
|
||||
2 ; serial
|
||||
604800 ; refresh (1 week)
|
||||
86400 ; retry (1 day)
|
||||
2419200 ; expire (4 weeks)
|
||||
604800 ; minimum (1 week)
|
||||
)
|
||||
NS srv-dns2.monlabo.lan.
|
||||
NS srv-service.monlabo.lan.
|
||||
$ORIGIN 0.16.172.in-addr.arpa.
|
||||
1 PTR srv-admin-jt.monlabo.lan.
|
||||
253 PTR srv-dns2.monlabo.lan.
|
||||
254 PTR svr-service.monlabo.lan.
|
||||
dhcp CNAME srv-service.monlabo.lan.
|
||||
dns CNAME srv-service.monlabo.lan.
|
||||
dns1 CNAME srv-service.monlabo.lan.
|
||||
dns2 CNAME srv-dns2.monlabo.lan.
|
||||
gateway CNAME srv-admin-jt.monlabo.lan.
|
||||
router CNAME srv-admin-jt.monlabo.lan.
|
||||
srvadmin CNAME srv-admin-jt.monlabo.lan.
|
||||
srvdhcp CNAME srv-service.monlabo.lan.
|
||||
srvdns CNAME srv-service.monlabo.lan.
|
||||
srvdns1 CNAME srv-service.monlabo.lan.
|
||||
srvdns2 CNAME srv-dns2.monlabo.lan.
|
18
sisr1/tp03-reseau-prive/srv-service/carte_reseau/interfaces
Normal file
18
sisr1/tp03-reseau-prive/srv-service/carte_reseau/interfaces
Normal file
@ -0,0 +1,18 @@
|
||||
# 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
|
||||
|
||||
# Assignation static IP adresse
|
||||
auto enp0s3
|
||||
iface enp0s3 inet static
|
||||
address 172.16.0.254/24
|
||||
gateway 172.16.0.1
|
113
sisr1/tp03-reseau-prive/srv-service/dhcp/dhcpd.conf
Normal file
113
sisr1/tp03-reseau-prive/srv-service/dhcp/dhcpd.conf
Normal file
@ -0,0 +1,113 @@
|
||||
# dhcpd.conf
|
||||
#
|
||||
# Sample configuration file for ISC dhcpd
|
||||
#
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
#option domain-name "example.org";
|
||||
#option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 600;
|
||||
max-lease-time 7200;
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
ddns-update-style none;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
#log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
#subnet 10.254.239.0 netmask 255.255.255.224 {
|
||||
# range 10.254.239.10 10.254.239.20;
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
#}
|
||||
|
||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
||||
# which we don't really recommend.
|
||||
|
||||
subnet 172.16.0.0 netmask 255.255.255.0 {
|
||||
range 172.16.0.20 172.16.0.119;
|
||||
option routers 172.16.0.1;
|
||||
option domain-name-servers 172.16.0.254, 172.16.0.253;
|
||||
option domain-name "monlabo.lan";
|
||||
}
|
||||
|
||||
# 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;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in
|
||||
# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.example.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
host srv-admin-jt {
|
||||
hardware ethernet 08:00:27:0a:1e:8b;
|
||||
fixed-address 172.16.0.1;
|
||||
}
|
||||
|
||||
host srv-dns2 {
|
||||
hardware ethernet 08:00:27:91:48:15;
|
||||
fixed-address 172.16.0.253;
|
||||
}
|
||||
|
||||
# You can declare a class of clients and then do address allocation
|
||||
# based on that. The example below shows a case where all clients
|
||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
||||
# other clients get addresses on the 10.0.29/24 subnet.
|
||||
|
||||
#class "foo" {
|
||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
||||
#}
|
||||
|
||||
#shared-network 224-29 {
|
||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-224.example.org;
|
||||
# }
|
||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-29.example.org;
|
||||
# }
|
||||
# pool {
|
||||
# allow members of "foo";
|
||||
# range 10.17.224.10 10.17.224.250;
|
||||
# }
|
||||
# pool {
|
||||
# deny members of "foo";
|
||||
# range 10.0.29.10 10.0.29.230;
|
||||
# }
|
||||
#}
|
29
sisr1/tp03-reseau-prive/srv-service/dns/db.monlabo.lan
Normal file
29
sisr1/tp03-reseau-prive/srv-service/dns/db.monlabo.lan
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
;
|
||||
; BIND data file for local loopback interface
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
NS srv-service.monlabo.lan.
|
||||
NS srv-dns2.monlabo.lan.
|
||||
srv-service.monlabo.lan. A 172.16.0.254
|
||||
srv-dns2.monlabo.lan. A 172.16.0.253
|
||||
srv-admin-jt.monlabo.lan. A 172.16.0.1
|
||||
|
||||
srvdhcp IN CNAME srv-service.monlabo.lan.
|
||||
dhcp IN CNAME srv-service.monlabo.lan.
|
||||
srvdns IN CNAME srv-service.monlabo.lan.
|
||||
dns IN CNAME srv-service.monlabo.lan.
|
||||
srvdns1 IN CNAME srv-service.monlabo.lan.
|
||||
dns1 IN CNAME srv-service.monlabo.lan.
|
||||
srvdns2 IN CNAME srv-dns2.monlabo.lan.
|
||||
dns2 IN CNAME srv-dns2.monlabo.lan.
|
||||
srvadmin IN CNAME srv-admin-jt.monlabo.lan.
|
||||
router IN CNAME srv-admin-jt.monlabo.lan.
|
||||
gateway IN CNAME srv-admin-jt.monlabo.lan.
|
30
sisr1/tp03-reseau-prive/srv-service/dns/db.monlabo.lan.rev
Normal file
30
sisr1/tp03-reseau-prive/srv-service/dns/db.monlabo.lan.rev
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
;
|
||||
; BIND data file for local loopback interface
|
||||
;
|
||||
$TTL 604800
|
||||
@ IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
@ IN NS srv-service.monlabo.lan.
|
||||
NS srv-dns2.monlabo.lan.
|
||||
|
||||
254 IN PTR svr-service.monlabo.lan.
|
||||
253 IN PTR srv-dns2.monlabo.lan.
|
||||
1 IN PTR srv-admin-jt.monlabo.lan.
|
||||
|
||||
srvdhcp IN CNAME srv-service.monlabo.lan.
|
||||
dhcp IN CNAME srv-service.monlabo.lan.
|
||||
srvdns IN CNAME srv-service.monlabo.lan.
|
||||
dns IN CNAME srv-service.monlabo.lan.
|
||||
srvdns1 IN CNAME srv-service.monlabo.lan.
|
||||
dns1 IN CNAME srv-service.monlabo.lan.
|
||||
srvdns2 IN CNAME srv-dns2.monlabo.lan.
|
||||
dns2 IN CNAME srv-dns2.monlabo.lan.
|
||||
srvadmin IN CNAME srv-admin-jt.monlabo.lan.
|
||||
router IN CNAME srv-admin-jt.monlabo.lan.
|
||||
gateway IN CNAME srv-admin-jt.monlabo.lan.
|
21
sisr1/tp03-reseau-prive/srv-service/dns/named.conf.local
Normal file
21
sisr1/tp03-reseau-prive/srv-service/dns/named.conf.local
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Do any local configuration here
|
||||
//
|
||||
|
||||
// zone direct
|
||||
zone "monlabo.lan"{
|
||||
type master;
|
||||
file"/etc/bind/db.monlabo.lan";
|
||||
};
|
||||
|
||||
// zone inverse
|
||||
zone "0.16.172.in-addr.arpa"{
|
||||
type master;
|
||||
notify no;
|
||||
file "/etc/bind/db.monlabo.lan.rev";
|
||||
};
|
||||
|
||||
// Consider adding the 1918 zones here, if they are not used in your
|
||||
// organization
|
||||
//include "/etc/bind/zones.rfc1918";
|
||||
|
24
sisr1/tp03-reseau-prive/srv-service/dns/named.conf.options
Normal file
24
sisr1/tp03-reseau-prive/srv-service/dns/named.conf.options
Normal file
@ -0,0 +1,24 @@
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
|
||||
// If there is a firewall between you and nameservers you want
|
||||
// to talk to, you may need to fix the firewall to allow multiple
|
||||
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
|
||||
|
||||
// If your ISP provided one or more IP addresses for stable
|
||||
// nameservers, you probably want to use them as forwarders.
|
||||
// Uncomment the following block, and insert the addresses replacing
|
||||
// the all-0's placeholder.
|
||||
|
||||
forwarders {
|
||||
10.121.38.7; // DNS lycée
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// If BIND logs error messages about the root key being expired,
|
||||
// you will need to update your keys. See https://www.isc.org/bind-keys
|
||||
//========================================================================
|
||||
dnssec-validation no;
|
||||
|
||||
listen-on-v6 { any; };
|
||||
};
|
30
sisr1/tp04_scripts_admin/Users.csv
Normal file
30
sisr1/tp04_scripts_admin/Users.csv
Normal file
@ -0,0 +1,30 @@
|
||||
Ermengarde,Berthelmot,eberthelmot0@webmd.com,Female,Accountant,
|
||||
Kassi,Bunker,kbunker1@xinhuanet.com,Female,Production,
|
||||
Moises,McCallum,mmccallum2@i2i.jp,Male,Production,
|
||||
Patrizio,Lune,plune3@upenn.edu,Male,Accountant,
|
||||
Blanch,Everix,beverix4@php.net,Female,Accountant,
|
||||
Stafani,Kibbel,skibbel5@marriott.com,Female,Production,
|
||||
Ignacius,Mosdell,imosdell6@cloudflare.com,Male,Management,
|
||||
Jeana,Waller-Bridge,jwallerbridge7@mapy.cz,Female,Management,
|
||||
Elroy,Dressel,edressel8@opera.com,Male,Production,
|
||||
Thea,Strettell,tstrettell9@nature.com,Female,Production,
|
||||
Solomon,Insoll,sinsolla@utexas.edu,Male,Accountant,
|
||||
Carri,Feedome,cfeedomeb@ask.com,Female,Accountant,
|
||||
Padraic,Chetwind,pchetwindc@last.fm,Male,Management,
|
||||
Solly,D'Ugo,sdugod@uiuc.edu,Male,Production,
|
||||
Konstanze,MacCostigan,kmaccostigane@seattletimes.com,Female,Accountant,
|
||||
Roxane,Powlesland,rpowleslandf@pcworld.com,Female,Management,
|
||||
Orelle,Kennealy,okennealyg@arstechnica.com,Female,Production,
|
||||
Sukey,Soitoux,ssoitouxh@shinystat.com,Female,Production,
|
||||
Nelli,Syce,nsycei@blogger.com,Female,Production,
|
||||
Clarisse,Shillam,cshillamj@dailymotion.com,Female,Production,
|
||||
Carin,Gueny,cguenyk@naver.com,Female,Management,
|
||||
Donny,Riepel,driepell@addtoany.com,Male,Production,
|
||||
Daniella,Ralfe,dralfem@wunderground.com,Female,Production,
|
||||
Lexy,Clynmans,lclynmansn@furl.net,Female,Production,
|
||||
Gardiner,Adamthwaite,gadamthwaiteo@spotify.com,Male,Production,
|
||||
Woodman,Lippett,wlippettp@purevolume.com,Male,Production,
|
||||
Nadya,Munnion,nmunnionq@flavors.me,Female,Production,
|
||||
Llewellyn,Habershon,lhabershonr@alibaba.com,Male,Production,
|
||||
Isaak,Greatrex,igreatrexs@seesaa.net,Male,Production,
|
||||
Darill,Frostdyke,dfrostdyket@cafepress.com,Male,Production,
|
|
23
sisr1/tp04_scripts_admin/createGroups.sh
Normal file
23
sisr1/tp04_scripts_admin/createGroups.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
file='./Users.csv'
|
||||
|
||||
while read ligne
|
||||
do
|
||||
# A chaque itération, stocker le métier dans $metier
|
||||
metier=$(echo $ligne | cut -d "," -f5)
|
||||
|
||||
# On regarde si les group existe
|
||||
# tail /etc/group
|
||||
|
||||
# Vérification de la présence du groupe -> ajout du group si il n'existe pas
|
||||
if [[ $(echo $ligne | grep $metier /etc/group) == "" ]] ; then
|
||||
groupadd $metier
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# On regarde si les groups ont été créé
|
||||
# tail /etc/group
|
||||
# echo $metier
|
||||
done < $file
|
34
sisr1/tp04_scripts_admin/createLogins.sh
Normal file
34
sisr1/tp04_scripts_admin/createLogins.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
file='./Users.csv'
|
||||
loginfile='./logins.csv'
|
||||
|
||||
# Suppression du fichier
|
||||
rm $loginfile 2> /dev/null # Redirection des erreurs
|
||||
# Création du fichier login.csv
|
||||
touch $loginfile
|
||||
|
||||
while read ligne
|
||||
do
|
||||
writelogin=""
|
||||
# A chaque itération, stocker le prénom dans $prenom
|
||||
first_name=$(echo $ligne | cut -d "," -f1)
|
||||
# A chaque itération, stocker le nom dans $nom
|
||||
last_name=$(echo $ligne | cut -d "," -f2)
|
||||
# A chaque itération, stocker le groupe utilisateur dans $group
|
||||
group=$(echo $ligne | cut -d "," -f5)
|
||||
# A chaque itération, stocker l'identifiant dans $login
|
||||
login=$(echo $first_name | cut -c1)$last_name
|
||||
# permert de transformer les majuscule en minuscule
|
||||
login=$(echo $login | tr [:upper:] [:lower:])
|
||||
# permet de supprimer les caractères spéciaux
|
||||
login=$(echo $login | tr -dc [:alnum:])
|
||||
# A chaque itération, stocker le mot de passe dans $password
|
||||
password=$(tr -dc A-Za-z0-9 </dev/urandom | head -c8)
|
||||
|
||||
# A chaque itération, stocker les informations récupéraient précédement dans $writelogin
|
||||
writelogin="$login;$password;$first_name;$last_name;$group"
|
||||
|
||||
echo $writelogin >> $loginfile
|
||||
done < $file
|
||||
|
24
sisr1/tp04_scripts_admin/createUsers.sh
Normal file
24
sisr1/tp04_scripts_admin/createUsers.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
file='./logins.csv'
|
||||
|
||||
while read line
|
||||
do
|
||||
|
||||
username=$(echo $line | cut -d ";" -f1)
|
||||
# créer l'utilisateur
|
||||
# option -m créer le répertoire courant dans /home et -s indique le shell
|
||||
useradd -m -s "/bin/bash" $username
|
||||
|
||||
group=$(echo $line | cut -d ";" -f5)
|
||||
# ajout l'utilisateur à son groupe
|
||||
usermod -aG $group $username
|
||||
|
||||
password=$(echo $line | cut -d ";" -f2)
|
||||
|
||||
# permet de changer le mot de passe
|
||||
echo $username:$password | chpasswd
|
||||
|
||||
chown $username:$username /home/$username
|
||||
|
||||
done < $file
|
17
sisr1/tp04_scripts_admin/deployUsers.sh
Normal file
17
sisr1/tp04_scripts_admin/deployUsers.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Première version
|
||||
ip=$1
|
||||
user=root
|
||||
workdir=/$user/deploy
|
||||
|
||||
ssh $user@$ip "mkdir $workdir" 2> /dev/null
|
||||
# Copie des scripts et fichiers
|
||||
scp "./createGroups.sh" "./logins.csv" "./Users.csv" "./createUsers.sh" $user@$ip:$workdir
|
||||
# Exécution les scripts
|
||||
ssh $user@$ip << EOF
|
||||
cd $workdir
|
||||
bash createGroups.sh
|
||||
bash createUsers.sh
|
||||
EOF
|
||||
ssh $user@$ip "rm -R $workdir"
|
16
sisr1/tp04_scripts_admin/gitpush.sh
Normal file
16
sisr1/tp04_scripts_admin/gitpush.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ] ; then
|
||||
read -p "Erreur: Ecrivez un message " $message
|
||||
else
|
||||
message="$1"
|
||||
fi
|
||||
|
||||
# Ajout des fichiers modifiers
|
||||
git add .
|
||||
|
||||
# Commit avec le message
|
||||
git commit -m "$message"
|
||||
|
||||
# Push vers le dépot
|
||||
git push -u https://jeremy.thomas@gitea.lyc-lecastel.fr/jeremy.thomas/siotp.git
|
30
sisr1/tp04_scripts_admin/logins.csv
Normal file
30
sisr1/tp04_scripts_admin/logins.csv
Normal file
@ -0,0 +1,30 @@
|
||||
eberthelmot;fbg3nGCr;Ermengarde;Berthelmot;Accountant
|
||||
kbunker;9BzXt6Xm;Kassi;Bunker;Production
|
||||
mmccallum;hV3TRJ73;Moises;McCallum;Production
|
||||
plune;oSfQHuvg;Patrizio;Lune;Accountant
|
||||
beverix;2f7B6btu;Blanch;Everix;Accountant
|
||||
skibbel;bVj3HByx;Stafani;Kibbel;Production
|
||||
imosdell;GJ1sNsGp;Ignacius;Mosdell;Management
|
||||
jwallerbridge;8ih7RbsF;Jeana;Waller-Bridge;Management
|
||||
edressel;Bw2xaoqL;Elroy;Dressel;Production
|
||||
tstrettell;qJnW4Qup;Thea;Strettell;Production
|
||||
sinsoll;2Kv0LM1x;Solomon;Insoll;Accountant
|
||||
cfeedome;yoxs6ala;Carri;Feedome;Accountant
|
||||
pchetwind;95n2yWyF;Padraic;Chetwind;Management
|
||||
sdugo;RWM6KyGw;Solly;D'Ugo;Production
|
||||
kmaccostigan;mZ2bsgTg;Konstanze;MacCostigan;Accountant
|
||||
rpowlesland;0MSFqeGE;Roxane;Powlesland;Management
|
||||
okennealy;3Wa2lRuz;Orelle;Kennealy;Production
|
||||
ssoitoux;vctbRwz9;Sukey;Soitoux;Production
|
||||
nsyce;X6v2Z4iA;Nelli;Syce;Production
|
||||
cshillam;4bbmoVDK;Clarisse;Shillam;Production
|
||||
cgueny;EuSp7vrP;Carin;Gueny;Management
|
||||
driepel;7c6bSIyH;Donny;Riepel;Production
|
||||
dralfe;d0uYqva6;Daniella;Ralfe;Production
|
||||
lclynmans;JXUvA7DR;Lexy;Clynmans;Production
|
||||
gadamthwaite;TryAdrjv;Gardiner;Adamthwaite;Production
|
||||
wlippett;uME9caqd;Woodman;Lippett;Production
|
||||
nmunnion;pBfKA2AO;Nadya;Munnion;Production
|
||||
lhabershon;FoDzxdD9;Llewellyn;Habershon;Production
|
||||
igreatrex;tOhtpET4;Isaak;Greatrex;Production
|
||||
dfrostdyke;H18DkhbJ;Darill;Frostdyke;Production
|
|
13
sisr1/tp05-Installation_proxy/dnsfwd.service
Normal file
13
sisr1/tp05-Installation_proxy/dnsfwd.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
|
||||
Description=execute /root/dnsfwd.sh
|
||||
|
||||
After=default.target
|
||||
|
||||
[Service]
|
||||
|
||||
ExecStart=bash /root/dnsfwd.sh
|
||||
|
||||
[Install]
|
||||
|
||||
WantedBy=default.target
|
11
sisr1/tp05-Installation_proxy/dnsfwd.sh
Normal file
11
sisr1/tp05-Installation_proxy/dnsfwd.sh
Normal file
@ -0,0 +1,11 @@
|
||||
!/bin/bash
|
||||
echo "1" > /proc/sys/net/ipv4/ip_forward
|
||||
nft add table dnsfwd
|
||||
nft add chain dnsfwd prerouting {type nat hook prerouting priority 0 \; }
|
||||
nft add chain dnsfwd postrouting {type nat hook postrouting priority 0 \; }
|
||||
nft add rule dnsfwd postrouting tcp dport 53 masquerade
|
||||
nft add rule dnsfwd postrouting udp dport 53 masquerade
|
||||
nft add rule dnsfwd prerouting tcp dport 53 masquerade
|
||||
nft add rule dnsfwd prerouting udp dport 53 masquerade
|
||||
nft add rule dnsfwd prerouting ct state established,related accept
|
||||
nft add rule dnsfwd postrouting ct state established,related accept
|
12
sisr1/tp05-Installation_proxy/squid/majservice.sh
Normal file
12
sisr1/tp05-Installation_proxy/squid/majservice.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
filename=squid.conf # nom du fichier
|
||||
filepath=/etc/squid # emplacement du fichier
|
||||
servicename=squid.service # nom du service
|
||||
|
||||
git pull # mise à jour du fichier de config du dépôt
|
||||
|
||||
sudo cp $filepath/$filename $filepath/$filename.old # sauvegarde fichier précédent
|
||||
sudo cp ./$filename $filepath/$filename # copie du fichier de config mis à jour son emplacement
|
||||
|
||||
sudo systemctl restart $servicename # redémarrage du service associé
|
9165
sisr1/tp05-Installation_proxy/squid/squid.conf
Normal file
9165
sisr1/tp05-Installation_proxy/squid/squid.conf
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user