{ * info-rmatique ! }

essentiel

enable secret […]
vlan 2
int fa0/2 / switchport access vlan 2
int ffa0/24 switchport mode trunk
switchport trunk native vlan 99
switchport voice vlan 5
swtitchport port-security max []
swtitchport port-security violation [protect/restrict/shutdown]
swtitchport port-security mac-address sticky/[adMAC]
username [user] privilege 15 secret [mdp] / ip domain-name [X]
crypto key generate rsa / line vty 0 4 / transport input ssh
ip routing / int vlan 2 / ip address [GT-switch]
Router(config)#interface fa0/0 / ip address [adIP] [MSR] / no sh
ip route [réseau destination] [MSR] [adIP-prochain-saut] (route statique)
ip route 0.0.0.0 0.0.0.0 [adIP-prochain-saut] (route par defaut)
ip route 10.10.1.0 255.255.255.0 10.10.2.0 6 (route flottante)
interface fa0/0.20 / encapsulation dot1Q 20 / ip address … (+allumer int physique)
router rip / network [IP_rs] pour chaque reseau directemt connecte
router eigrp 1 / network 10.5.1.0 0.0.0.255 pr chq rs dirt con
router ospf 0 / network 10.0.0.0 0.0.0.3 area 0 pr chq rs dirct con (0=zone backbone)
ip dhcp pool VLAN10 / network /default-router / option 150 ip X (SCCP)
int fa0/0 / teleph-serv max-ep+dn / ip sorurce-ad X port Y / auto assign
access-list 1 deny 172.16.1.10 0.0.0.0
int fa0/0 / ip access-group 1 out
access-list 100 permit tcp host 192.168.1.10 host 192.168.100.50 eq 80
access-list 100 deny tcp any any eq 22
int fa0/0 / ip access-group 100 in
ip access-list extended web
permit icmp host 192.168.1.10 host 172.16.1.10 echo
int fa0/0 / ip access-group web in

adduser ou useradd -m -s /bin/bash boby
passwd boby
usermod -aG sudo boby
chmod -R 700 Dossier
chown -R toto:toto Dossier
setfacl (-R) -m u:boby:rwx Dossier/fichier ou (g:tech:rwx)

apt-get update && sudo apt-get upgrade
apt-get install sudo (debian)
hosname
hosts
/etc/network/interfaces ou /etc/netplan/01-network-manager-all.yaml
auto eth0
iface eth0 inet static
address 192.168.10.135
netmask 255.255.255.0
reboot
journalctl -u service

apt install samba samba-common-bin
/etc/samba/smbd.conf
[partage] path = /…
writable = yes
browsable = yes
systemctl restart smbd (gerer droits)
client : apt install cifs-utils
mount -t cifs //IPsrv/partage /pathlocal

apt install nfs-kernel-server
/etc/exports -> /mnt/share IPrs/24 (rw,sync,no_subtree_check)
chown -R anto:dev /mnt/share (+chmod 755)
systemctl restart nfs-kernel-server
exportfs -a
client : apt install nfs-common
mount -t nfs4 IPsrv:/mnt/share /pathlocal

apt-get install ngnix -> /etc/nginx/sites-available/default
et /var/www/html/index.ngnix-debian.html

apt-get install apache2 php curl mariadb-server -y
mariadb-secure-intallation -> mariadb -u root -p
create database GLPI;
grant all privileges on root.* to admin_glpi@localhost identified by « votre-MDP »;
sudo systemctl restart mariadb

tar -zcvf archive.tar.gz Dcible (ou zxvf pr decompression)
apt-get install rsync
rsync -e ssh -avz
crontab -e -> mn h j mois jour-sem ./script.sh >> backup.log
ou user /usr/bin/apt-get update
usr/bin/rm -rf /home/anto/tmp/*
apt install isc-dhcp-server / /etc/default/isc-d… /etc/dhcp/dhcpd.conf

apt install openssh-server / systemctl strat-enable-status / /etc/ssh/sshd_config
ssh-keygen -t rsa -b 4096 / ssh-copy-id (-p X) user@IPsrv
chmod -Rf 700 ~/.ssh / restart
~./ssh/config -> host/hostName/user/port/identityFile ~./.ssh/id_ras (id_25519)
win : ssh-keygen -t ed25519 (ou PutyGen)
get-service ssh-agent | set-service -startuptype automatique
start-service ssh-agent
ssh-add c:\users\toto.ssh\id_ed25519
scp -r (-P X) Dsource user@IPdest:/Ddest
win : winSCP

sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 2222/tcp
sudo ufw enable
Ufw status verbose

apt install nmap / nmap IPresau/msr
nmap -T4 -A -v adIP / -sP:hotes actifs -p 22,80

uname -a (OS) / uname -m (archi64) / lshw / lscpu / free -h
fdisk -l
kill -9 numero_de_PID / pkill -9 [prgm]
ps -A / ps -fC [prgm] / ps –C mysql –o %cpu
ss -lntp | grep 22
top / top -o %CPU / top -o %MEM
sudo tcpdump host ubuntu23 -n -c5 / tcpdump port 2049 or port 111

netsh advfirewall set allprofiles state off
ipconfig /all /releasr /renew /displaydns /flushdns /?
gpupdate /force / gpresult /r
diskpart / list disk / select disk 2
net use X: \srv\dossier
msinfo32 / set (archi64)