Skip to content

Instantly share code, notes, and snippets.

View dginhoux's full-sized avatar

Dany GINHOUX dginhoux

View GitHub Profile
@dginhoux
dginhoux / DNSSEC-Signing.md
Created November 3, 2024 20:04 — forked from stokito/DNSSEC-Signing.md
DNSSEC Keys and Signing Process Simplified

cyber-security-2296269_1920

DNSSEC Keys and Signing Process Simplified

This article describes what happens when a zone is signed with DNSSEC. This document helps to understand the concept of zone signing and does not detail the actual steps for signing a zone.

@dginhoux
dginhoux / linux_targetd_mode_file.md
Created July 23, 2024 17:09
linux_targetd_mode_file

h1. installation d'une qla25xx dans tina-save-cat

h1. création des backstores/fileio


mkdir -p /var/ibm.quorum
chown -R root:root /var/ibm.quorum
dd if=/dev/zero of=/var/ibm.quorum/quorum1.disk count=1024 bs=1M
@dginhoux
dginhoux / linux_fc_spoofing.md
Created July 23, 2024 17:08
linux_fc_spoofing

h1. essai wwn spoofing manuel : VALIDE

h2. sans npiv


fabric2-67:admin> portshow 91 
portWwn:   20:5b:50:eb:1a:2d:67:54
portWwn of device(s) connected:
	51:40:2e:c0:18:1a:8a:4c
@dginhoux
dginhoux / linux_extend_partition_as_lvm_pv.md
Created July 23, 2024 16:45
linux_extend_partition_as_lvm_pv

h2. Agrandissement d'un disque

ici, dans cet exemple augmentation à chaud de la taille du premier disque (en général sda) (à partir du vsphere): passage de 20 Go à 30 Go.

Afin que le noyau identifie ce changement de taille, le disque sda doit être re-scanné :

echo 1>/sys/class/block/sda/device/rescan
@dginhoux
dginhoux / init_mikrotik.rsc
Created July 23, 2024 16:40
mikrotik_create_eth5_outofband_remove_all_default_config
#####################################
##### FROM ether2 192.168.88.1
#####################################
## remove defconf firewall filter
/ip firewall filter remove [find dynamic=no]
/ip firewall nat remove [find]
/ip firewall raw remove [find]
/ip firewall mangle remove [find]
/ip firewall address-list remove [find]
/ip firewall layer7-protocol remove [find]
h1. installation d'une qla25xx dans tina-save-cat
h1. création des backstores/fileio
<pre><code class="coffeescript">
mkdir -p /var/ibm.quorum
chown -R root:root /var/ibm.quorum
dd if=/dev/zero of=/var/ibm.quorum/quorum1.disk count=1024 bs=1M
@dginhoux
dginhoux / linux_grub_repair_from_live_distro
Last active July 23, 2024 16:39
linux : grub repair from live distro
fdisk -l # pour vous aider à trouver la partition sur laquelle est votre ubuntu
mount /dev/sdaX /mnt # montage de celle-ci en remplaçant le X par le bon numéro de partition
mount --bind /dev /mnt/dev # lien symbolique du dossier /dev en cours d'utilisation vers le disque monté
mount --bind /dev/pts /mnt/dev/pts # lien symbolique du dossier /dev/pts en cours d'utilisation vers le disque monté
mount --bind /sys /mnt/sys # lien symbolique du dossier /sys en cours d'utilisation vers le disque monté
mount -t proc /proc /mnt/proc # Pour que Grub2 trouve /proc/mounts
chroot /mnt /bin/bash # mise à la racine du disque monté
mount -a # montage des partitions dans le chroot
apt-get install grub-pc # installation du logiciel Grub2 (sur le disque maintenant à la racine)
update-grub # création d'un nouveau fichier de configuration : grub.cfg
# No-IP DDNS Updater
# http://www.noip.com/integrate/
:global publicIP;
:global abortUpdate;
:if ([:typeof $abortUpdate] != "bool") do={
:set $abortUpdate false;
}
#!/bin/bash
export ANSIBLE_DIR="/mnt/gfs_lv_ansible"
export VENV_NAME="venv"
export VENV_DIR="$ANSIBLE_DIR/$VENV_NAME"
export PIP_LIST="ansible ansible-lint jinja2 jmespath yamllint"
export ACTION=$1
# find /data -type d -print0 | xargs -0 chmod 755
# find /data -type f -print0 | xargs -0 chmod 644
find /data -type d -exec chmod 755 {} \;
find /data -type f -exec chmod 644 {} \;