Outils pour utilisateurs

Outils du site


blog

Notes IPv6

Voir :

2025/03/24 15:06

Notes iptables

Les bases

Il existe les tables :

  • filter (défaut)
  • nat
  • mangle

Bloquer une IP en sortie

Pour bloquer l'IP 192.168.2.18 en sortie.

iptables -I OUTPUT -d 192.168.2.18 -j REJECT

Pour effacer la règle

iptables -D OUTPUT -d 192.168.2.18 -j REJECT

Nettoyer / supprimer plusieurs règles qui contiennent un motif spécifique

Exemple : pour supprimer toutes les règles contenant “445”

iptables -S | grep 445 | sed -e 's/^-A/-D/' | xargs -L1 iptables

Logs

iptables -A INPUT -p igmp -j LOG --log-level info --log-prefix "IGMP:"
 
# log pour paquets refusés
iptables -N LOGDROP
iptables -A LOGDROP -m limit --limit 5/second  -j LOG --log-level notice --log-ip-options --log-prefix "Netfilter refused:"
iptables -A LOGDROP -j DROP
 
# iptables -A pub-priv -m limit --limit 5/second  -j LOG --log-level notice --log-ip-options --log-prefix "Netfilter pub-priv:"
 
iptables -A FORWARD -j LOGDROP
iptables -A INPUT -j LOGDROP
 
 
 
iptables -A INPUT -p icmp -m limit -j LOG --log-prefix "ICMP/IN: "
iptables -A OUTPUT -p icmp -m limit -j LOG --log-prefix "ICMP/OUT: "
iptables -A FORWARD -p icmp -m limit -j LOG --log-prefix "ICMP/FWD: "
2025/03/24 15:06

Notes IPC shared memory

Voir :

Voir aussi :

#Total de la RAM
total=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}')
 
# 90% de la mémoire physique max
ratio=0.9
 
# On applique le ratio et on converti en pages de 4096
shmall=$(echo $total/4096*$ratio+1 | bc)
shmmax=$(echo $total*$ratio | bc)
 
# On arrondi la valeur
shmall=$(echo $shmall | sed -e 's/\..*$//')
shmmax=$(echo $shmmax | sed -e 's/\..*$//')
 
echo $shmall > /proc/sys/kernel/shmall
echo $shmmax > /proc/sys/kernel/shmmax
 
# ipcs -lm
#################
 
 
#################
# Overcommit memory ?
# sysctl -w vm.overcommit_memory=2
 
# Page size ?
# getconf PAGE_SIZE
# cat /proc/sys/kernel/shmmni
#################
 
#### SEMAPHORES
# http://www.postgresql.org/docs/9.1/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS
# SEMMNS is the second parameter in output of cat /proc/sys/kernel/sem (default value 32000) 
# SEMMNI is the last parameter there, default value 128 - this is the limiting factor - SEMMNI must be at least at least ceil(max_connections / 16)
 
# http://www.puschitz.com/TuningLinuxForOracle.shtml#TheSEMMNSParameter
# http://www.postgresql.org.es/node/229
####

Connaître la PAGE_SIZE \ Voir https://en.wikipedia.org/wiki/Page_%28computer_memory%29

getconf PAGE_SIZE
cat /proc/sys/kernel/shmmni
$ ipcs

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x0052e2c1 32768      postgres   600        56         20                      
0x00000000 17924097   wouter     600        33554432   2          dest         
0x00000000 49446914   wouter     600        524288     2          dest         
[...]

$ ipcs -i 17924097 -m -p

Shared memory Segment shmid=17924097
uid=1000    gid=1000    cuid=1000   cgid=1000
mode=01600  access_perms=0600
bytes=33554432  lpid=3808   cpid=1457   nattch=2
att_time=Fri Jul  3 10:43:28 2015  
det_time=Fri Jul  3 10:43:28 2015  
change_time=Fri Jul  3 10:03:00 2015 

Debug

Source : http://www.makelinux.net/alp/035

The ipcs command provides information on interprocess communication facilities, including shared segments. Use the -m flag to obtain information about shared memory. For example, this code illustrates that one shared memory segment, numbered 1627649, is in use:

% ipcs -m 

 

------ Shared Memory Segments -------

key       shmid     owner     perms     bytes     nattch    status 

0x00000000 1627649   user    640       25600     0 

If this memory segment was erroneously left behind by a program, you can use the ipcrm command to remove it.

% ipcrm shm 1627649 

Periodically remove allocated semaphores which belong to the user running the plugin. This can be achieved like this (example for the user “nrpe”)\ Source : http://folk.uio.no/trondham/software/check_openmanage.html

ipcrm $(ipcs -s | awk '/nrpe/ {print "-s ",$2}')
2025/03/24 15:06

Notes IPA International Phonetic Alphabet

Sous Linux

Voir aussi :

Installation de la police

sudo apt-get install fonts-ipaexfont

Install tables pour clavier virtuel

sudo apt install ibus-table-ipa-x-sampa
Dans LibreOffice

Insertion - Caractères spéciaux

Font IPAexMoncho / IPAexGothic
Character block IPA Extensions
Claviers virtuels

Il est aussi possible d'utiliser le Character Map /usr/bin/gucharmap \ Puis “View - By Unicode Block”

Il est aussi possible d'utiliser onboard

apt-get install onboard

Avec Keymap \

apt-get install keymap

Dans le systray de IBus : \

Preferences IPA-X-SAMPA
Preferences IPA-X-SAMPA

Avec IBus \

Ouvrir l’icône sysstray

Emoji Choise - Open Unicode choice IPA Extensions
Emoji Choise - Open Unicode choice Combining Diacritical Marks
2025/03/24 15:06

Notes interface graphique en python - GUI

Voir :

Voir :

  • PySide6
  • PyQt6 & Qt Designer
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki