Table des matières
- 2026:
- 2025:
13 billet(s) pour novembre 2026
| Réseaux - protocole QUIC mieux que TCP | 2026/11/17 21:26 | Jean-Baptiste |
| Notes conversion JSON YAML | 2026/11/13 11:16 | Jean-Baptiste |
| Git commit perdu | 2026/11/12 18:16 | Jean-Baptiste |
| Notes mojo lang | 2026/11/11 20:34 | Jean-Baptiste |
| Notes rust lang compilation | 2026/11/11 18:35 | Jean-Baptiste |
| Mémoire VSIZE VMSIZE SEGV lang C | 2026/11/11 15:59 | Jean-Baptiste |
| Ansible-navigator utilisation de ansible-vault | 2026/11/06 11:33 | Jean-Baptiste |
| Err Ansible - Module result deserialization failed No start of json char found | 2026/11/06 09:09 | Jean-Baptiste |
| Script Python conversion JSON vers CSV | 2026/11/06 08:14 | Jean-Baptiste |
| Filter Incoming IPv4 Packets Containing IP Options - cve-2026-98432 mitigation - Kernel TCP Use-After-Free | 2026/11/04 21:04 | Jean-Baptiste |
| Notes ZFS | 2026/11/03 18:04 | Jean-Baptiste |
| Diff image container | 2026/11/03 16:30 | Jean-Baptiste |
| Notes processus multi-thread | 2026/11/03 10:59 | Jean-Baptiste |
Postfix ajout d'un nouveau alias d'email
Exemple pour que jean@acme.fr reçoit maintenant les emails destiné à poleemploi@acme.fr
1 Modif du fichier "aliases"
On ajout une ligne au fichier /etc/aliases comme ci-dessous
/etc/aliases
ebay1001: jean
2 Pour générer le fichier ''%%/etc/aliases.db%%''
newaliases
Il n'est pas nécessaire de faire un “reload” ni un “restart” de Postfix
Police de caractères - fonts
Voir :
Polices de caractères :
- Google Noto
- Lohit
- tex-gyre
Voir https://bits.debian.org/2021/12/2000-fonts-debian.html
ITP #973779 fnt install scheherazadenew RFP #944140 fnt install arsenal RFP #757249 fnt install ekmukta RFP #724629 fnt install firasans RFP #766211 fnt install orbitron RFP #803690 fnt install pompiere RFP #754784 fnt install raleway RFP #827735 fnt install reemkufi RFP #986999 fnt install redhat{display,mono,text}
sudo fc-match "Noto Color Emoji" sudo apt-get install fonts-noto-color-emoji # copy config from this gist your profile config directory cp 10-emoji.conf $XDG_CONFIG_HOME/fontconfig/conf.d/10-emoji.conf # regenerate font cache fc-cache -f -v
Open this url in your browser \ https://eosrei.github.io/emojione-color-font/full-demo.html
~/.config/fontconfig/conf.d/01-emoji.conf
https://gist.github.com/probil/36dd02d6c9d8446f027aaafb1728a0f3#file-10-emoji-conf ~/.config/fontconfig/conf.d/99-emoji.conf (you will probably need to create the folders!) and add this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match> <test name="family"><string>sans-serif</string></test> <edit name="family" mode="append" binding="strong"> <string>Bitstream Vera Serif</string> <string>Noto Color Emoji</string> </edit> </match> <!-- Add emoji generic family --> <alias binding="strong"> <family>emoji</family> <default><family>Noto Color Emoji</family></default> </alias> <!-- Aliases for the other emoji fonts --> <alias binding="strong"> <family>Apple Color Emoji</family> <prefer><family>Noto Color Emoji</family></prefer> </alias> <alias binding="strong"> <family>Segoe UI Emoji</family> <prefer><family>Noto Color Emoji</family></prefer> </alias> <alias binding="strong"> <family>Emoji One</family> <prefer><family>Noto Color Emoji</family></prefer> </alias> </fontconfig>
cp /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf /usr/local/share/fonts/ chmod 644 /usr/local/share/fonts/NotoColorEmoji.ttf
clear font cache
fc-cache -fv
Autres - setfont
Source : https://tookmund.com/2024/01/fixing-my-shell
if [ -t 1 ] then setfont /usr/share/consolefonts/Lat15-Terminus20x10.psf.gz fi
dpkg-reconfigure console-setup
fc-cache ~/.fonts/
chkfontpath --add /usr/share/fonts/local/
ttmkfdir -d /usr/share/fonts/local/ -o /usr/share/fonts/local/fonts.scale
Method to add fonts is as follows:
- Double-click on the “Computer” icon on your desktop.
- In the “File” menu, choose “Open Location…”
- Type in: fonts: * When the fonts window appears, drag and drop the fonts to be installed into this window. The new fonts you install should be usable by most GNOME applications. Some applications may have to be restarted to use the newly added fonts. Source : https://docs.redhat.com/en/documentation/Red_Hat_Enterprise_Linux/5/html-single/international_language_support_guide/index ===== Fonts libres ===== * https://en.wikipedia.org/wiki/Cantarell_(typeface)
Pb Plantage connexion OpenWRT 100% sirq Soft IRQ
J'ai toujours le Pb, ce qui est ci-dessous n'est pas La Solution
Voir
Depuis que je suis passé à la fibre (FTTH), mon WRT54GT équipé d'OpenWRT ne semble plus suivre. Il redémarre assez souvent, quand je télécharge ou regarde un vidéo sur youTub en HD. Et donc perte de connexion
En me connectant en SSH sur le routeur et grâce à top je constate que lors de gros téléchargement(s) le CPU est occupé à presque 100% par des Soft IRQ.
Voir :
- /proc/interrupts
- /proc/softirqs
- /proc/stat
/proc/interrupts
CPU0 3: 16 MIPS serial, gpio 4: 228251 MIPS eth0 7: 423222 MIPS timer ERR: 0
J'en profite pour faire un peu de ménage dans /etc/firewall.user pour alléger la table filter d'iptables. Ce qui ne change absolument rien au Pb.
Étape 1
Pour nos teste, on désactive le chien de garde. (remplacé sur les version plus récente par procd !?)
On jette un œil
ps -ef | grep watchdog watchdog -t 5 /dev/watchdog
Ne pas tuer le processus watchdog, sinon risque de reboot 60 secondes après ! Voir http://www.guiguishow.info/2011/08/23/openwrt-watchdog-en-voila-un-bon-toutou/
Pour tester quand même. Attention, redémarrage dans 60s
/etc/init.d/watchdog stop reboot
ou
killall watchdog
Voir wdctl
Optimisation
Ne corrige pas le pb de fond, permet juste de regarder une vidéo en HD sur USATupe
Désactiver le max de module dans /etc/modules.d/
Attention ici je désactive le wiki
20-cfg80211:#cfg80211 21-mac80211:#mac80211 30-ppp:#slhc 30-ppp:#ppp_generic 30-ppp:#ppp_async 40-pppoe:#pppox 40-pppoe:#pppoe 41-ipt-conntrack:#iptable_raw 45-ipt-nathelper:#nf_conntrack_ftp 45-ipt-nathelper:#nf_nat_ftp 45-ipt-nathelper:#nf_conntrack_irc 45-ipt-nathelper:#nf_nat_irc 45-ipt-nathelper:#nf_conntrack_tftp 45-ipt-nathelper:#nf_nat_tftp
/etc/init.d/sysntpd disable /etc/init.d/dnsmasq disable
reboot
Reproduire le Pb / faire planter le routeur
iperf et bwm-ng sont deux outils sympa pour mesurer la bande passante réseau
Sur une machine sur internet
iperf -s
Dans le réseaux local
iperf -c <IP MACHINE_SUR_INTERNET> -i 1 -P 32
-P 32 : ouvre 32 connexions simultanées C'est le nombre de connexion ouverte simultanées qui fait crasher le routeur/pare-feu.
NB : le pb se présente dans les deux sens (en inversant le client et le serveur iperf -s et iperf -c)
Solution
Désactiver nf_conntrack_acct (ce qui est peut-être le cas par défaut) J'ai quand même une fois réussi à faire planter le routeur en faisant un test iperf
/etc/sysctl.conf
#net.netfilter.nf_conntrack_acct=1 net.netfilter.nf_conntrack_acct=0
Brouillons
sudo ping -f -s 1472 192.168.1.2 hping3 --flood 192.168.1.2 -1 -d 1472
J'en profite pour tester ce petit script, sans succès
nomaxconnect.sh
# http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.doc/info/aes/ae/tprf_tunelinux.html # Lorsqu'un débit important de demandes de connexion entrante entraîne des échecs de connexion echo 3000 > /proc/sys/net/core/netdev_max_backlog echo 3000 > /proc/sys/net/core/somaxconn echo 1 > /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout echo 1 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_time_wait echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout echo 200 > /proc/sys/kernel/threads-max echo 50 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
Conf par défaut
cat /proc/sys/net/core/netdev_max_backlog 1000 cat /proc/sys/net/core/somaxconn 128 cat /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout 60 cat /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_time_wait 120 cat /proc/sys/net/ipv4/tcp_fin_timeout 30 cat /proc/sys/kernel/threads-max 207 cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max 16384
PHP-FPM RedHat7 CentOS7 Apache 2.4
Avant de passer en PHP-FPM nous avions ✈ :
/etc/httpd/conf.d/php.conf
# # Cause the PHP interpreter to handle files with a .php extension. # <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> # # Allow php to handle Multiviews # AddType text/html .php # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php # # Uncomment the following lines to allow PHP to pretty-print .phps # files as PHP source code: # #<FilesMatch \.phps$> # SetHandler application/x-httpd-php-source #</FilesMatch> # # Apache specific PHP configuration options # those can be override in each configured vhost # php_value session.save_handler "files" php_value session.save_path "/var/lib/php/session"
yum remove php rm /etc/httpd/conf.d/php.conf yum install php-fpm
Avec FPM
/etc/httpd/conf.d/php-fpm.conf
# # PHP-FPM avec le compte php-monsiteweb (car 127.0.0.1:9001) # <FilesMatch \.php$> #SetHandler application/x-httpd-php # 2.4.10+ can proxy to unix socket # SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/" # Else we can just use a tcp socket: SetHandler "proxy:fcgi://127.0.0.1:9001" </FilesMatch> # # Allow php to handle Multiviews # AddType text/html .php # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php
/etc/php-fpm.d/monsiteweb.conf
[monsiteweb] #listen = /var/run/php5-fpm.sock listen = 127.0.0.1:9001 listen.allowed_clients = 127.0.0.1 user = php-monsiteweb group = php-monsiteweb #pm = dynamic pm = ondemand pm.max_children = 50 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 35 # Pour debug #catch_workers_output = yes #php_flag[display_errors] = on #php_admin_flag[log_errors] = on #request_slowlog_timeout = 10s #slowlog = /var/log/php-fpm/www-slow.log php_admin_value[error_log] = /var/log/php-fpm/www-error.log php_value[session.save_handler] = files # Doit être accessible en écriture par l'utilisateur PHP-FPM (définie dans ce fichier "user = ") php_value[session.save_path] = /var/lib/php/session/php-monsiteweb php_value[date.timezone] = "Europe/Paris" # A ajuster php_value[memory_limit] = 64M php_value[post_max_size] = 10M php_value[max_execution_time] = 60 php_value[max_input_time] = 60
adduser --system --home /var/www/monsiteweb/ php-monsiteweb mkdir /var/lib/php/session/php-monsiteweb chown -R php-monsiteweb:php-monsiteweb /var/lib/php/session/php-monsiteweb systemctl enable php-fpm.service systemctl restart php-fpm.service systemctl status php-fpm.service
PHP MySQL snippet
<?php $serveur = "127.0.0.1"; $login = "my_user"; $pass = "my_password"; $base = "my_db"; //$link = mysqli_connect("127.0.0.1", "my_user", "my_password", "my_db"); $link = mysqli_connect($serveur, $login, $pass, $base); if (!$link) { echo "Error: Unable to connect to MySQL." . PHP_EOL; echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; echo "Debugging error: " . mysqli_connect_error() . PHP_EOL; exit; } echo "Success: A proper connection to MySQL was made! The my_db database is great." . PHP_EOL; echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL; $resultat = $link->query ("SELECT id, titre, image_s FROM ARTICLES WHERE statut > 0 ORDER BY date DESC, id DESC LIMIT 0, 1"); $ligne = $resultat->fetch_assoc(); echo 'ID :'.$ligne["id"].'Titre : '.$ligne["titre"]; mysqli_close($link); ?>
