Cacher que l'on utilise Qubes-os:
Pour cacher que vous utilisez Qubes-os, copiez le texte ci dessous dans le fichier et le dossier comme décris à l'intérieur selon que vous utilisez un template Fedora ou Debian:
#!/bin/bash set -e -o pipefail # # Set a random hostname for a VM session. # # Instructions: # 1. This file must be placed and made executable (owner: root) inside the template VM of your network VM such that it will be run before your hostname is sent over a network. # In a Fedora template, use `/etc/NetworkManager/dispatcher.d/pre-up.d/00_hostname`. # In a Debian template, use `/etc/network/if-pre-up.d/00_hostname`. # 2. Execute `sudo touch /etc/hosts.lock` inside the template VM of your network VM. # 3. Execute inside your network VM: # `sudo bash -c 'mkdir -p /rw/config/protected-files.d/ && echo -e "/etc/hosts\n/etc/hostname" > /rw/config/protected-files.d/protect_hostname.txt'` #NOTE: mv is atomic on most systems if [ -f "/rw/config/protected-files.d/protect_hostname.txt" ] && rand="$RANDOM" && mv "/etc/hosts.lock" "/etc/hosts.lock.$rand" ; then name="PC-$rand" echo "$name" > /etc/hostname hostname "$name" #NOTE: NetworkManager may set it again after us based on DHCP or /etc/hostname, cf. `man NetworkManager.conf` @hostname-mode #from /usr/lib/qubes/init/qubes-early-vm-config.sh if [ -e /etc/debian_version ]; then ipv4_localhost_re="127\.0\.1\.1" else ipv4_localhost_re="127\.0\.0\.1" fi sed -i "s/^\($ipv4_localhost_re\(\s.*\)*\s\).*$/\1${name}/" /etc/hosts sed -i "s/^\(::1\(\s.*\)*\s\).*$/\1${name}/" /etc/hosts fi exit 0
Pour vérifier que tout c’est bien passé, relancez la sys-net et vérifiez en tapant «hostname» dans un terminal de la sys-net et vérifiez qu’il est bien indiqué PC-[number] avec [number] qui change à chaque fois que la sys-net est relancé.