https://byte-sized.de/linux-unix/wegwerf-browser-fuer-freebsd-13-2-mit-pot/#english Skip to content byte-sized Der IT-Blog * Hacking + Allgemein * Informatik + Algorithmen & Datenstrukturen * Linux/Unix * Netzwerk * Windows * Privacy * Kontakt * Impressum Linux/Unix Wegwerf-Browser fur FreeBSD 13.2 mit pot 25. Oktober 202326. Oktober 2023 Wegwerf-Browser konnen zu einem ausserst nutzlichen Tool werden, wenn es darum geht einen Browser isoliert vom Host-System zu betreiben. So ist sichergestellt, dass Firefox keinerlei Zugriff auf die Daten vom Host-System bekommt. Attention: For the english version, click here! Wenn du eine Session beendest, kannst du sicher sein, dass die ganze Browser-Umgebung geloscht ist und genau so einfach lasst sich ein neuer Browser auch wieder neu aufsetzen, der vollstandig getrennt vom Host-System agiert. Das Ganze lasst sich mit dem Jail-Manager pot einfach umsetzen. In der Vergangenheit habe ich bereits hier ein kleines Tutorial zu pot verfasst. Voraussetzung fur den Wegwerf-Browser Sofern du FreeBSD noch nicht mit einer grafischen Oberflache nutzt, solltest du es spatestens jetzt tun. Diese wird spater benotigt, um den isolierten Browser innerhalb einer Jail offnen konnen. Hier sind ein paar Moglichkeiten aufgelistet, um unter FreeBSD 13.2 eine Desktop-Umgebung zu installieren: * FreeBSD - Cinnamon als GUI installieren * FreeBSD - GNOME als GUI installieren * FreeBSD - LXQt als GUI installieren * FreeBSD - KDE Plasma 5 als GUI installieren * FreeBSD 13 - Xfce als GUI installieren Eine geeignete Jail erstellen Wenn du jetzt eine Desktop-Umgebung installiert hast kannst du dich jetzt, um die Jail kummern. Als erstes, solltest du wieder dein Repository updaten: pkg update && pkg upgrade -y Ist das getan, installierst du pot, um damit im Anschluss deine Jail zu erstellen: pkg install pot Daraufhin musst du pot initialisieren. pot init Danach solltest du pot in der /etc/rc.conf verfugbar machen, sodass nach einem Neustart pot automatisch mitgestartet wird. service pot enable Im nachsten Schritt erstellst du eine Jail mit dem Namen ffbox. Als base system kannst du FreeBSD 13.2 nutzen und die Netzwerkverbindung sollte public-bridge sein. pot create -p ffbox -b 13.2 -t single -N public-bridge Wechsel in deine erstellte Jail mittels folgendem Kommando: pot run ffbox Hierbei wird die Jail auch automatisch gestartet. Wie du am Prompt erkennst, bist du nun als root@ffbox angemeldet. Innerhalb der Jail installierst du nun die Pakete xauth und Firefox. xauth wird benotigt, um dadurch im weiteren Verlauf des Tutorials mittels ssh -X die Verbindung zum remote display innerhalb der Jail weiterzuleiten. Deshalb ist es wichtig vorab eine funktionierende Desktop-Umgebung installiert zu haben. pkg install xauth firefox Bearbeite nun die Datei /etc/ssh/sshd_config mit dem Editor deiner Wahl und treffe folgendee Einstellungen: PublicKeyAuthentication yes X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost Die PublicKeyAuthentication lasst die SSH-Verbindung mittels Public Key auf die Jail zu. Durch X11Forwarding wird Verbindung zum remote display in der Jail hergestellt. Dies geschieht alles uber die Netzwerkverbindung. Um dafur die grafische Oberflache von deinem Host-System zu nutzen muss X11UseLocalhost auf yes gesetzt sein. X11DisplayOffset legt den ersten verfugbaren Display fest, um X11Forwarding uber ssh nutzen zu konnen. Da der SSH-Dienst in der Jail bisher noch nicht gestartet war, solltest du das jetzt tun. service sshd enable service sshd start Hast du das alles erledigt empfehle ich dir einen seperaten User mit adduser anzulegen. root@ffbox:~ # adduser Username: ffuser Full name: Uid (Leave empty for default): Login group [ffuser]: wheel Login group is wheel. Invite ffuser into other groups? []: Login class [default]: Shell (sh csh tcsh bash rbash nologin) [sh]: Home directory [/home/ffuser]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: Enter password again: Verlasse nun deine Jail mit exit. Wieder auf dem Host-System, offne ein Terminal. ssh -X ffuser@10.192.0.3 firefox Bevor du aber jetzt den Browser allerdings nutzt, solltest du mit dem letzten Kapitel fortfahren. Snapshot erstellen und einspielen Bevor du jetzt jedes Mal die Jail loschst und neu erstellst, kannst du dir uber pot einen Snapshot sichern und ihn bei Bedarf wieder zuruckrollen. Zuerst muss die Jail gestoppt werden. pot stop ffbox Im Anschluss kannst du den Snapshot ziehen, anstatt die Jail zu loschen. pot snapshot -p ffbox Jetzt kannst du die Jail wieder zuruckrollen. pot revert -p ffbox Fazit Jetzt hast du deinen eigenen Wegwerf-Browser innerhalb einer Jail eingerichtet. Damit kannst du isoliert vom Host-System einfach und bequem surfen. Wenn du eine neue Session benotigst, nutze den zuvor erstellten Snapshot und rolle die Jail zuruck. Viel Spass beim Ausprobieren. --------------------------------------------------------------------- Disposable browser for FreeBSD 13.2 with pot A disposable browser can become an extremely useful tool when it comes to running a browser isolated from the host system. This ensures that Firefox has no access to the data on the host system. When you end a session, you can be sure that the entire browser environment is deleted, and setting up a new browser is just as simple, operating completely separately from the host system. All of this can be easily achieved using the jail manager pot. In the past, I have already written a small tutorial on pot here. Prerequisites for the disposable browser If you're not already using FreeBSD with a graphical interface, you should do so now. This will be required later to open the isolated browser within a jail. Here are a few options for installing a desktop environment on FreeBSD 13.2: * FreeBSD - Cinnamon als GUI installieren * FreeBSD - GNOME als GUI installieren * FreeBSD - LXQt als GUI installieren * FreeBSD - KDE Plasma 5 als GUI installieren * FreeBSD 13 - Xfce als GUI installieren Creating an Appropriate Jail Once you've installed a desktop environment, you can now focus on creating the jail. First, update your repository: pkg update && pkg upgrade -y Once that's done, install pot to create your jail: pkg install pot Next, initialize pot: pot init Afterward, you should make pot available in the /etc/rc.conf file so that pot is automatically started upon reboot. service pot enable In the next step, create a jail named ffbox. You can use FreeBSD 13.2 as the base system, and the network connection should be public-bridge. pot create -p ffbox -b 13.2 -t single -N public-bridge Access your newly created jail using the following command: pot run ffbox This command also automatically starts the jail. As you can see from the prompt, you are now logged in as root@ffbox. Inside the jail, install the packages xauth and Firefox. xauth is required to forward the connection to the remote display inside the jail using ssh -X in the later part of the tutorial. Therefore, it's essential to have a functioning desktop environment installed beforehand. pkg install xauth firefox Now, edit the file /etc/ssh/sshd_config using your preferred text editor and make the following settings: PublicKeyAuthentication yes X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost The PublicKeyAuthentication allows the SSH connection to the jail using a public key. X11Forwarding establishes a connection to the remote display inside the jail, all done over the network connection. To use the graphical interface from your host system, X11UseLocalhost must be set to yes. X11DisplayOffset specifies the first available display for using X11Forwarding over SSH. Since the SSH service was not yet running in the jail, you should do that now. service sshd enable service sshd start Once you've completed these steps, I recommend creating a separate user with adduser. root@ffbox:~ # adduser Username: ffuser Full name: Uid (Leave empty for default): Login group [ffuser]: wheel Login group is wheel. Invite ffuser into other groups? []: Login class [default]: Shell (sh csh tcsh bash rbash nologin) [sh]: Home directory [/home/ffuser]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: Enter password again: Now, exit your jail with exit. Back on the host system, open a terminal and use the following command: ssh -X ffuser@10.192.0.3 firefox Before using the browser, you should continue with the last section. Creating and Restoring Snapshots Instead of deleting and recreating the jail each time, you can use pot to take a snapshot and roll it back when needed. First, you need to stop the jail: pot stop ffbox Next, you can create a snapshot instead of deleting the jail: pot snapshot -p ffbox Now, you can roll back the jail: pot revert -p ffbox Conclusion You have now set up your own disposable browser within a jail. This allows you to browse in isolation from the host system easily and conveniently. When you need a new session, use the previously created snapshot and roll back the jail. Enjoy experimenting! Post Views: 954 firefoxFreeBSDJailspotUNIX Previous Prometheus und Grafana unter Ubuntu installieren und einbinden Start the discussion Schreibe einen Kommentar Antworten abbrechen Deine E-Mail-Adresse wird nicht veroffentlicht. Erforderliche Felder sind mit * markiert [ ] [ ] [ ] [ ] [ ] [ ] [ ] Kommentar * [ ] Name * [ ] E-Mail * [ ] Website [ ] [ ] Meinen Namen, meine E-Mail-Adresse und meine Website in diesem Browser fur die nachste Kommentierung speichern. Kommentar abschicken [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] Support This Site If you like what I do please support me! Search for: [ ] Newest Posts * Wegwerf-Browser fur FreeBSD 13.2 mit pot * Prometheus und Grafana unter Ubuntu installieren und einbinden * Wie richtet man SSH ohne Passwortabfrage ein? * Cisco Router als DHCP-Server konfigurieren * pot - Ein Jail-Manager fur FreeBSD Popular Posts * FreeBSD - Cinnamon als GUI installieren (6.213) * FreeBSD - GNOME als GUI installieren (5.560) * Netflix auf FreeBSD schauen (4.549) * Bastille Templates fur FreeBSD Jails (4.133) * ugrep vs. grep - Wo liegen die Unterschiede? (3.995) Links Cyber Security Intelligence bsdbox.de Vermaden bsdnow - Podcast Kategorien Kategorien[Kategorie auswahlen ] Listed Blogverzeichnis Bloggerei.de TopBlogs.de das Original - Blogverzeichnis | Blog Top Liste Meta * Registrieren * Anmelden * Feed der Eintrage * Kommentare-Feed * WordPress.org (c) 2023 -- byte-sized, Designed by Evolve Themes and Proudly powered by WordPress.