Outils pour utilisateurs

Outils du site


tech:notes_linux_kernel_namespaces_espace_de_noms

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_linux_kernel_namespaces_espace_de_noms [2025/09/28 01:07] Jean-Baptistetech:notes_linux_kernel_namespaces_espace_de_noms [2025/10/10 09:22] (Version actuelle) Jean-Baptiste
Ligne 12: Ligne 12:
 * https://man7.org/linux/man-pages/man7/user_namespaces.7.html * https://man7.org/linux/man-pages/man7/user_namespaces.7.html
 * https://developers.redhat.com/blog/2020/09/25/rootless-containers-with-podman-the-basics#example__using_rootless_containers * https://developers.redhat.com/blog/2020/09/25/rootless-containers-with-podman-the-basics#example__using_rootless_containers
-* https://github.com/rootless-containers/slirp4netns+* https://github.com/rootless-containers/slirp4netns (va être remplacé par **pasta** à partir de Podman 5) 
 +* https://blog.quarkslab.com/digging-into-linux-namespaces-part-1.html
 * https://blog.quarkslab.com/digging-into-linux-namespaces-part-2.html * https://blog.quarkslab.com/digging-into-linux-namespaces-part-2.html
 * https://ifeanyi.co/posts/linux-namespaces-part-3/ * https://ifeanyi.co/posts/linux-namespaces-part-3/
 +* https://blog.quarkslab.com/digging-into-linux-namespaces-part-2.html
 +* https://www.redhat.com/en/blog/building-container-namespaces
 +* https://www.redhat.com/en/blog/container-namespaces-nsenter
 +
 +
 +Sécurité - échappement :
 +* https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation/index.html
 +
 +
 +== Commandes unshare nsenter
 +
 +Voir :
 +* https://commandmasters.com/commands/nsenter-linux/
 +* https://thelinuxcode.com/nsenter-linux-command/
 +* https://knowledge.broadcom.com/external/article/389166/using-nsenter-for-troubleshooting-kubern.html
  
  
Ligne 28: Ligne 44:
  
 <code -> <code ->
-jb@vmdeb1:~$ sudo unshare --fork --pid --mount-proc bash+jb@vmdeb1:~$ sudo unshare --fork --pid --mount-proc bash 
 +jb@vmdeb1:~$ unshare -U -r -m --mount-proc -f -p
 root@vmdeb1:/home/jb# ps -ef root@vmdeb1:/home/jb# ps -ef
 UID        PID  PPID  C STIME TTY          TIME CMD UID        PID  PPID  C STIME TTY          TIME CMD
Ligne 198: Ligne 215:
 Voir aussi la commande **systemd-cgtop** Voir aussi la commande **systemd-cgtop**
  
 +== nsenter
  
-=== FS Mount +<code bash> 
 +nerdctl inspect --format {{.State.Pid}} kind-control-plane 
 +nsenter --target 6491 --mount --uts --ipc --net --pid 
 +</code> 
 + 
 + 
 +== Réseau 
 + 
 +Voir : 
 +  * https://passt.top/passt/about/#pasta-pack-a-subtle-tap-abstraction ( **pasta** va remplacer **slirp4netns** à partir de Podman 5) 
 + 
 +<code bash> 
 +podman unshare --rootless-netns ip addr 
 +</code> 
 + 
 + 
 +== FS Mount 
  
 <code bash> <code bash>
Ligne 240: Ligne 274:
 <code bash> <code bash>
 ls -l /var/lib/docker/ ls -l /var/lib/docker/
 +</code>
 +
 +
 +== Pb
 +
 +=== Err unshare failed: Operation not permitted
 +
 +<code ->
 +$ unshare -f --mount-proc -m bash
 +unshare: unshare failed: Operation not permitted
 +</code>
 +
 +Solution
 +<code ->
 +$ unshare -U -r -m --mount-proc -f -p
 +root@vivabelo:~# 
 </code> </code>
  
  
tech/notes_linux_kernel_namespaces_espace_de_noms.1759014457.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki