Jailing Firefox .....Getting error .... Can't proceed

This is the wiki that I am trying to follow >> https://wiki.freebsd.org/JailingGUIApplications

When I enter the command bsdinstall jail /zroot/jails/basejail this happens & I can't proceed

bsdinstall.png

What do I do ?
Note : I have tried almost all the mirrors but same thing happens.
 
Hmm. The file does exist,

Code:
% curl --list-only ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/13.0-RELEASE/ | sort
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   151    0   151    0     0    577      0 --:--:-- --:--:-- --:--:--   578
base-dbg.txz
base.txz
BUILDDATE
GITBRANCH
kernel-dbg.txz
kernel.txz
lib32-dbg.txz
lib32.txz
MANIFEST
ports.txz
REVISION
src.txz
tests.txz
%

Does anything here help?

 
Thanks. My memory of things such as this (without jails) is fuzzy, but try starting afresh.

(A fresh start, like rebooting from the installation medium when bsdinstall fails with a real computer.)



IIRC, years ago, neither Exit nor Restart had the required effect. Something like, a restart was not a fresh start (if a failure occurred, then Restart was more like Refail) and it was simpler to stop the computer, than to attempt an understanding of the failure.
 
When I enter the command bsdinstall jail /zroot/jails/basejail this happens & I can't proceed
As the wiki states you don't need necessarily bsdinstall(8) to populate a jail.
Here we used the bsdinstall method for convenience. Otherwise downloading and unpacking base.txz and configuring it should suffice.
Copy & paste command to terminal.
Code:
fetch https://download.freebsd.org/releases/amd64/13.0-RELEASE/base.txz ; tar xf base.txz -C /zroot/jails/basejail
See also handbook chapter 15.3.1.2. To install a Jail from an ISO.

For future use make base.txz identifiable, rename it to e.g. base-13.0-R.txz.

After the package is extracted update the jail:
Code:
# env PAGER=cat freebsd-update -b /zroot/jails/basejail fetch install

EDIT:

Apropos, there is an easier method to jail www/firefox. Use sysutils/bastille to bootstrap "Jailfox".

Edit Bastillefile to exclude packages like noto-basic noto-emoji noto-extra, those are huge and not absolutely necessary.
 
T-Daemon

This is what happened

Code:
root@home:/home/home # fetch https://download.freebsd.org/releases/amd64/13.0-RELEASE/base.txz ; tar xf base.txz -C /zroot/jails/basejail
base.txz                                               180 MB 4621 kBps    40s
root@home:/home/home # zfs snapshot zroot/jails/basejail@latest
root@home:/home/home #  zfs create zroot/jails/firefox
root@home:/home/home # zfs clone zroot/jails/basejail@latest zroot/jails/firefox/root
root@home:/home/home # zfs create zroot/jails/firefox/var
root@home:/home/home # zfs create zroot/jails/firefox/tmp
root@home:/home/home # zfs create zroot/jails/firefox/home
root@home:/home/home # rsync -a /zroot/jails/firefox/root/var/ /zroot/jails/firefox/var/
rsync: Command not found.
root@home:/home/home # pkg install rsync
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    rsync: 3.2.3_1
    xxhash: 0.8.0

Number of packages to be installed: 2

The process will require 1 MiB more space.
428 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Fetching rsync-3.2.3_1.pkg: 100%  355 KiB 363.2kB/s    00:01 
[2/2] Fetching xxhash-0.8.0.pkg: 100%   73 KiB  75.1kB/s    00:01 
Checking integrity... done (0 conflicting)
[1/2] Installing xxhash-0.8.0...
[1/2] Extracting xxhash-0.8.0: 100%
[2/2] Installing rsync-3.2.3_1...
[2/2] Extracting rsync-3.2.3_1: 100%
root@home:/home/home # rsync -a /zroot/jails/firefox/root/var/ /zroot/jails/firefox/var/
root@home:/home/home # zfs set mountpoint=/zroot/jails/firefox/root/var zroot/jails/firefox/var
root@home:/home/home # zfs set mountpoint=/zroot/jails/firefox/root/tmp zroot/jails/firefox/tmp
root@home:/home/home # zfs set mountpoint=/zroot/jails/firefox/root/usr/home zroot/jails/firefox/home
root@home:/home/home # zfs set setuid=off exec=off zroot/jails/firefox/var
root@home:/home/home # zfs set setuid=off exec=off zroot/jails/firefox/tmp
root@home:/home/home # zfs set setuid=off exec=off zroot/jails/firefox/home
root@home:/home/home # zfs set setuid=off exec=off zroot/jails/firefox/home
root@home:/home/home # pkg -c /zroot/jails/firefox/root install firefox xauth liberation-fonts-ttf
Updating FreeBSD repository catalogue...

^C
root@home:/home/home # pkg -c /zroot/jails/firefox/root install firefox xauth liberation-fonts-ttf
Updating FreeBSD repository catalogue...
^C
root@home:/home/home # service pf disable
pf disabled in /etc/rc.conf
root@home:/home/home # service pf enable
pf enabled in /etc/rc.conf
root@home:/home/home # service pf stop
Disabling pf.
root@home:/home/home # pkg -c /zroot/jails/firefox/root install firefox xauth liberation-fonts-ttf
Updating FreeBSD repository catalogue...
pkg: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/meta.txz: No address record
repository FreeBSD has no meta file, using default settings
pkg: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg: No address record
pkg: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz: No address record
Unable to update repository FreeBSD
Error updating repositories!

How is PF effecting this Jail ?

Code:
$ cat /etc/pf.conf
block all
pass out proto { tcp udp } to port { 53 80 443 995 6697 123 }
pass out inet proto icmp icmp-type { echoreq }
 
Code:
# pkg -c /zroot/jails/firefox/root install firefox xauth liberation-fonts-ttf
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
Fetching packagesite.pkg: 100%    6 MiB   3.4MB/s    00:02   
Processing entries: 100%
FreeBSD repository update completed. 31366 packages processed.
All repositories are up to date.
The following 129 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    adwaita-icon-theme: 40.1.1
    aom: 3.2.0_1
    argp-standalone: 1.3_4
    argyllcms: 1.9.2_5
    at-spi2-atk: 2.34.2
    at-spi2-core: 2.36.0
    atk: 2.36.0
    avahi-app: 0.8
    ca_root_nss: 3.71
    cairo: 1.17.4,3
    colord: 1.3.5_1
    cups: 2.3.3op2
    dav1d: 0.9.2
    dbus: 1.12.20_5
    dbus-glib: 0.112
    dejavu: 2.37_1
    desktop-file-utils: 0.26_1
    encodings: 1.0.5,1
    expat: 2.4.3
    ffmpeg: 4.4.1_3,1
    firefox: 96.0.3,2
    font-bh-ttf: 1.0.3_4
    font-misc-ethiopic: 1.0.4
    font-misc-meltho: 1.0.3_4
    fontconfig: 2.13.94_1,1
    freetype2: 2.11.1
    fribidi: 1.0.11
    gdbm: 1.22
    gdk-pixbuf2: 2.40.0
    gettext-runtime: 0.21
    giflib: 5.2.1
    glib: 2.70.2,2
    gmp: 6.2.1
    gnome_subr: 1.0
    gnutls: 3.6.16
    graphite2: 1.3.14
    gsettings-desktop-schemas: 41.0
    gtk-update-icon-cache: 3.24.26_1
    gtk3: 3.24.31
    harfbuzz: 3.2.0
    hicolor-icon-theme: 0.17
    icu: 70.1_1,1
    indexinfo: 0.3.1
    jbigkit: 2.1_1
    jpeg-turbo: 2.1.1_1
    lame: 3.100_3
    lcms2: 2.12
    libICE: 1.0.10,1
    libSM: 1.2.3,1
    libX11: 1.7.2,1
    libXScrnSaver: 1.2.3_2
    libXau: 1.0.9
    libXcomposite: 0.4.5,1
    libXcursor: 1.2.0
    libXdamage: 1.1.5
    libXdmcp: 1.1.3
    libXext: 1.3.4,1
    libXfixes: 6.0.0
    libXft: 2.3.4
    libXi: 1.8,1
    libXinerama: 1.1.4_2,1
    libXmu: 1.1.3,1
    libXrandr: 1.5.2
    libXrender: 0.9.10_2
    libXt: 1.2.1,1
    libXtst: 1.2.3_2
    libXxf86vm: 1.1.4_3
    libass: 0.15.2
    libdaemon: 0.14_1
    libdrm: 2.4.109,1
    libedit: 3.1.20210216,1
    libepoll-shim: 0.0.20210418
    libepoxy: 1.5.9
    liberation-fonts-ttf: 2.1.5,2
    libevent: 2.1.12
    libffi: 3.3_1
    libfontenc: 1.1.4
    libglvnd: 1.4.0
    libiconv: 1.16
    libidn2: 2.3.2
    libogg: 1.3.5,4
    libpaper: 1.1.28
    libpci: 3.7.0_1
    libpciaccess: 0.16
    libpthread-stubs: 0.4
    librsvg2-rust: 2.52.5
    libtasn1: 4.18.0
    libtheora: 1.1.1_7
    libudev-devd: 0.5.0
    libunistring: 0.9.10_1
    libv4l: 1.20.0_2
    libva: 2.13.0_1
    libvdpau: 1.4
    libvorbis: 1.3.7_2,3
    libvpx: 1.11.0
    libx264: 0.163.3060
    libxcb: 1.14_1
    libxkbcommon: 1.3.1
    libxml2: 2.9.12
    mkfontscale: 1.2.1
    mpdecimal: 2.5.1
    nettle: 3.7.3
    nspr: 4.33
    nss: 3.74
    opus: 1.3.1
    p11-kit: 0.24.0
    pango: 1.48.11
    pciids: 20211124
    pcre: 8.45
    pixman: 0.40.0_1
    png: 1.6.37_1
    polkit: 0.120_1
    python38: 3.8.12_1
    readline: 8.1.1
    shared-mime-info: 2.0_2
    spidermonkey78: 78.9.0_4
    sqlite3: 3.35.5_4,1
    tiff: 4.3.0
    tpm-emulator: 0.7.4_2
    trousers: 0.3.14_3
    vmaf: 2.3.0_2
    wayland: 1.20.0
    webp: 1.2.1
    x265: 3.4_2
    xauth: 1.1
    xkeyboard-config: 2.34
    xorg-fonts-truetype: 7.7_1
    xorgproto: 2021.5
    xvid: 1.3.7,1

Number of packages to be installed: 129

The process will require 981 MiB more space.
182 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/129] Fetching firefox-96.0.3,2.pkg: 100%   55 MiB   4.1MB/s    00:14   
[2/129] Fetching xauth-1.1.pkg: 100%   22 KiB  22.7kB/s    00:01   
[3/129] Fetching liberation-fonts-ttf-2.1.5,2.pkg:   6%   96 KiB  98.3kB/s    00[3/129] Fetching liberation-fonts-ttf-2.1.5,2.pkg:  96%    1 MiB   1.3MB/s    00[3/129] Fetching liberation-fonts-ttf-2.1.5,2.pkg: 100%    1 MiB 735.7kB/s    00:02   
[4/129] Fetching pixman-0.40.0_1.pkg: 100%  321 KiB 328.3kB/s    00:01   
[5/129] Fetching libxcb-1.14_1.pkg: 100%    1 MiB 528.0kB/s    00:02   
[6/129] Fetching libXdmcp-1.1.3.pkg: 100%   15 KiB  15.0kB/s    00:01   
[7/129] Fetching xorgproto-2021.5.pkg: 100%  222 KiB 226.9kB/s    00:01   
[8/129] Fetching libXau-1.0.9.pkg: 100%   11 KiB  11.3kB/s    00:01   
[9/129] Fetching libpthread-stubs-0.4.pkg: 100%    2 KiB   2.0kB/s    00:01   
[10/129] Fetching libXrender-0.9.10_2.pkg: 100%   30 KiB  30.8kB/s    00:01   
[11/129] Fetching libX11-1.7.2,1.pkg: 100%    2 MiB 837.6kB/s    00:02   
[12/129] Fetching libXrandr-1.5.2.pkg: 100%   30 KiB  30.9kB/s    00:01   
[13/129] Fetching libXext-1.3.4,1.pkg: 100%   95 KiB  96.8kB/s    00:01   
[14/129] Fetching libXfixes-6.0.0.pkg: 100%   14 KiB  14.5kB/s    00:01   
[15/129] Fetching libXdamage-1.1.5.pkg: 100%    6 KiB   6.6kB/s    00:01   
[16/129] Fetching libXcomposite-0.4.5,1.pkg: 100%   11 KiB  10.8kB/s    00:01   
[17/129] Fetching pango-1.48.11.pkg: 100%    1 MiB 747.8kB/s    00:02   
[18/129] Fetching xorg-fonts-truetype-7.7_1.pkg: 100%    508 B   0.5kB/s    00:01   
[19/129] Fetching font-misc-meltho-1.0.3_4.pkg:  27%  200 KiB 204.8kB/s    00:02[19/129] Fetching font-misc-meltho-1.0.3_4.pkg: 100%  718 KiB 735.4kB/s    00:01   
[20/129] Fetching mkfontscale-1.2.1.pkg: 100%   21 KiB  21.1kB/s    00:01   
[21/129] Fetching libfontenc-1.1.4.pkg: 100%   20 KiB  20.5kB/s    00:01   
[22/129] Fetching freetype2-2.11.1.pkg: 100%    1 MiB   1.1MB/s    00:01   
[23/129] Fetching png-1.6.37_1.pkg: 100%  292 KiB 298.6kB/s    00:01   
[24/129] Fetching fontconfig-2.13.94_1,1.pkg:   8%   40 KiB  41.0kB/s    00:10 E[24/129] Fetching fontconfig-2.13.94_1,1.pkg: 100%  453 KiB 464.2kB/s    00:01   
[25/129] Fetching expat-2.4.3.pkg: 100%  104 KiB 106.2kB/s    00:01   
[26/129] Fetching font-misc-ethiopic-1.0.4.pkg:  75%   96 KiB  98.3kB/s    00:00[26/129] Fetching font-misc-ethiopic-1.0.4.pkg: 100%  127 KiB 130.3kB/s    00:01   
[27/129] Fetching font-bh-ttf-1.0.3_4.pkg: 100%  268 KiB 274.9kB/s    00:01   
[28/129] Fetching encodings-1.0.5,1.pkg: 100%  558 KiB 285.6kB/s    00:02   
[29/129] Fetching dejavu-2.37_1.pkg: 100%    2 MiB   1.3MB/s    00:02   
[30/129] Fetching libXft-2.3.4.pkg: 100%   65 KiB  66.9kB/s    00:01   
[31/129] Fetching harfbuzz-3.2.0.pkg: 100%  836 KiB 428.2kB/s    00:02   
[32/129] Fetching graphite2-1.3.14.pkg: 100%  100 KiB 102.3kB/s    00:01   
[33/129] Fetching glib-2.70.2,2.pkg: 100%    3 MiB   1.7MB/s    00:02   
[34/129] Fetching libxml2-2.9.12.pkg: 100%  831 KiB 851.3kB/s    00:01   
[35/129] Fetching python38-3.8.12_1.pkg: 100%   17 MiB   3.6MB/s    00:05   
[36/129] Fetching mpdecimal-2.5.1.pkg: 100%  322 KiB 329.7kB/s    00:01   
[37/129] Fetching readline-8.1.1.pkg: 100%  360 KiB 369.0kB/s    00:01   
[38/129] Fetching indexinfo-0.3.1.pkg: 100%    6 KiB   5.7kB/s    00:01   
[39/129] Fetching libffi-3.3_1.pkg: 100%   39 KiB  40.1kB/s    00:01   
[40/129] Fetching gettext-runtime-0.21.pkg: 100%  166 KiB 169.9kB/s    00:01   
[41/129] Fetching pcre-8.45.pkg: 100%    1 MiB   1.3MB/s    00:01   
[42/129] Fetching libiconv-1.16.pkg: 100%  608 KiB 622.9kB/s    00:01   
[43/129] Fetching cairo-1.17.4,3.pkg: 100%    1 MiB   1.1MB/s    00:01   
[44/129] Fetching libglvnd-1.4.0.pkg: 100%  339 KiB 347.6kB/s    00:01   
[45/129] Fetching xkeyboard-config-2.34.pkg:  12%   80 KiB  81.9kB/s    00:07 ET[45/129] Fetching xkeyboard-config-2.34.pkg: 100%  648 KiB 663.5kB/s    00:01   
[46/129] Fetching libXxf86vm-1.1.4_3.pkg: 100%   18 KiB  18.4kB/s    00:01   
[47/129] Fetching wayland-1.20.0.pkg: 100%  124 KiB 126.8kB/s    00:01   
[48/129] Fetching libepoll-shim-0.0.20210418.pkg:  71%   16 KiB  16.4kB/s    00:[48/129] Fetching libepoll-shim-0.0.20210418.pkg: 100%   22 KiB  22.8kB/s    00:01   
[49/129] Fetching libdrm-2.4.109,1.pkg: 100%  234 KiB 240.1kB/s    00:01   
[50/129] Fetching libpciaccess-0.16.pkg: 100%   22 KiB  22.3kB/s    00:01   
[51/129] Fetching pciids-20211124.pkg: 100%  223 KiB 228.4kB/s    00:01   
[52/129] Fetching libedit-3.1.20210216,1.pkg:  11%   16 KiB  16.4kB/s    00:07 E[52/129] Fetching libedit-3.1.20210216,1.pkg: 100%  136 KiB 138.9kB/s    00:01   
[53/129] Fetching libepoxy-1.5.9.pkg: 100%  279 KiB 285.4kB/s    00:01   
[54/129] Fetching libudev-devd-0.5.0.pkg: 100%   17 KiB  17.1kB/s    00:01   
[55/129] Fetching fribidi-1.0.11.pkg: 100%   80 KiB  81.6kB/s    00:01   
[56/129] Fetching libXt-1.2.1,1.pkg: 100%  450 KiB 461.1kB/s    00:01   
[57/129] Fetching libSM-1.2.3,1.pkg: 100%   24 KiB  24.5kB/s    00:01   
[58/129] Fetching libICE-1.0.10,1.pkg: 100%   92 KiB  94.3kB/s    00:01   
[59/129] Fetching gtk3-3.24.31.pkg: 100%   11 MiB   2.9MB/s    00:04   
[60/129] Fetching libxkbcommon-1.3.1.pkg: 100%  192 KiB 196.6kB/s    00:01   
[61/129] Fetching libXinerama-1.1.4_2,1.pkg: 100%   11 KiB  10.8kB/s    00:01   
[62/129] Fetching libXi-1.8,1.pkg: 100%  125 KiB 127.5kB/s    00:01   
[63/129] Fetching libXcursor-1.2.0.pkg: 100%   34 KiB  35.2kB/s    00:01   
[64/129] Fetching adwaita-icon-theme-40.1.1.pkg:   0%   40 KiB  41.0kB/s    03:4[64/129] Fetching adwaita-icon-theme-40.1.1.pkg:   4%  408 KiB 376.8kB/s    00:3[64/129] Fetching adwaita-icon-theme-40.1.1.pkg:  34%    3 MiB   2.7MB/s    00:0[64/129] Fetching adwaita-icon-theme-40.1.1.pkg:  84%    7 MiB   4.7MB/s    00:0[64/129] Fetching adwaita-icon-theme-40.1.1.pkg: 100%    9 MiB   2.3MB/s    00:04   
[65/129] Fetching gtk-update-icon-cache-3.24.26_1.pkg:  21%   16 KiB  16.4kB/s  [65/129] Fetching gtk-update-icon-cache-3.24.26_1.pkg: 100%   75 KiB  77.0kB/s    00:01   
[66/129] Fetching gdk-pixbuf2-2.40.0.pkg: 100%  510 KiB 521.9kB/s    00:01   
[67/129] Fetching shared-mime-info-2.0_2.pkg:  26%   96 KiB  98.3kB/s    00:02 E[67/129] Fetching shared-mime-info-2.0_2.pkg: 100%  357 KiB 365.7kB/s    00:01   
[68/129] Fetching tiff-4.3.0.pkg: 100%  847 KiB 433.4kB/s    00:02   
[69/129] Fetching jpeg-turbo-2.1.1_1.pkg: 100%  364 KiB 372.4kB/s    00:01   
[70/129] Fetching jbigkit-2.1_1.pkg: 100%   73 KiB  74.4kB/s    00:01   
[71/129] Fetching atk-2.36.0.pkg: 100%  294 KiB 300.8kB/s    00:01   
[72/129] Fetching cups-2.3.3op2.pkg: 100%    1 MiB   1.5MB/s    00:01   
[73/129] Fetching gnutls-3.6.16.pkg: 100%    2 MiB   1.3MB/s    00:02   
[74/129] Fetching trousers-0.3.14_3.pkg: 100%  476 KiB 486.9kB/s    00:01   
[75/129] Fetching tpm-emulator-0.7.4_2.pkg: 100%  114 KiB 116.4kB/s    00:01   
[76/129] Fetching gmp-6.2.1.pkg: 100%  479 KiB 490.4kB/s    00:01   
[77/129] Fetching p11-kit-0.24.0.pkg: 100%  447 KiB 458.1kB/s    00:01   
[78/129] Fetching libtasn1-4.18.0.pkg: 100%  147 KiB 150.4kB/s    00:01   
[79/129] Fetching ca_root_nss-3.71.pkg: 100%  256 KiB 262.5kB/s    00:01   
[80/129] Fetching nettle-3.7.3.pkg: 100%    1 MiB   1.5MB/s    00:01   
[81/129] Fetching libidn2-2.3.2.pkg: 100%  112 KiB 114.9kB/s    00:01   
[82/129] Fetching libunistring-0.9.10_1.pkg:  29%  152 KiB 155.7kB/s    00:02 ET[82/129] Fetching libunistring-0.9.10_1.pkg: 100%  509 KiB 520.7kB/s    00:01   
[83/129] Fetching libpaper-1.1.28.pkg: 100%   24 KiB  24.4kB/s    00:01   
[84/129] Fetching avahi-app-0.8.pkg: 100%  341 KiB 348.8kB/s    00:01   
[85/129] Fetching gnome_subr-1.0.pkg: 100%    2 KiB   1.8kB/s    00:01   
[86/129] Fetching libevent-2.1.12.pkg: 100%  321 KiB 329.0kB/s    00:01   
[87/129] Fetching libdaemon-0.14_1.pkg: 100%   32 KiB  33.1kB/s    00:01   
[88/129] Fetching dbus-glib-0.112.pkg: 100%  165 KiB 169.2kB/s    00:01   
[89/129] Fetching dbus-1.12.20_5.pkg: 100%  368 KiB 376.8kB/s    00:01   
[90/129] Fetching gdbm-1.22.pkg: 100%  203 KiB 208.2kB/s    00:01   
[91/129] Fetching hicolor-icon-theme-0.17.pkg: 100%   13 KiB  13.7kB/s    00:01   
[92/129] Fetching librsvg2-rust-2.52.5.pkg: 100%    4 MiB   2.2MB/s    00:02   
[93/129] Fetching colord-1.3.5_1.pkg: 100%  589 KiB 603.4kB/s    00:01   
[94/129] Fetching polkit-0.120_1.pkg: 100%  155 KiB 158.3kB/s    00:01   
[95/129] Fetching spidermonkey78-78.9.0_4.pkg:   1%   96 KiB  98.3kB/s    01:14 [95/129] Fetching spidermonkey78-78.9.0_4.pkg:  12%  888 KiB 811.0kB/s    00:12 [95/129] Fetching spidermonkey78-78.9.0_4.pkg:  67%    5 MiB   4.1MB/s    00:00 [95/129] Fetching spidermonkey78-78.9.0_4.pkg: 100%    7 MiB   2.5MB/s    00:03   
[96/129] Fetching nspr-4.33.pkg: 100%  244 KiB 250.4kB/s    00:01   
[97/129] Fetching icu-70.1_1,1.pkg: 100%   11 MiB   2.8MB/s    00:04   
[98/129] Fetching lcms2-2.12.pkg: 100%    2 MiB   1.0MB/s    00:02   
[99/129] Fetching argyllcms-1.9.2_5.pkg: 100%    5 MiB   2.8MB/s    00:02   
[100/129] Fetching libXScrnSaver-1.2.3_2.pkg: 100%   15 KiB  15.5kB/s    00:01   
[101/129] Fetching sqlite3-3.35.5_4,1.pkg: 100%    1 MiB   1.3MB/s    00:01   
[102/129] Fetching gsettings-desktop-schemas-41.0.pkg:  26%  160 KiB 163.8kB/s  [102/129] Fetching gsettings-desktop-schemas-41.0.pkg: 100%  599 KiB 613.5kB/s    00:01   
[103/129] Fetching at-spi2-atk-2.34.2.pkg: 100%   62 KiB  63.3kB/s    00:01   
[104/129] Fetching at-spi2-core-2.36.0.pkg: 100%  188 KiB 192.6kB/s    00:01   
[105/129] Fetching libXtst-1.2.3_2.pkg: 100%   20 KiB  20.8kB/s    00:01   
[106/129] Fetching nss-3.74.pkg: 100%    2 MiB   1.0MB/s    00:02   
[107/129] Fetching libvpx-1.11.0.pkg: 100%    1 MiB 669.0kB/s    00:02   
[108/129] Fetching ffmpeg-4.4.1_3,1.pkg: 100%    9 MiB   2.5MB/s    00:04   
[109/129] Fetching xvid-1.3.7,1.pkg: 100%  285 KiB 291.7kB/s    00:01   
[110/129] Fetching x265-3.4_2.pkg: 100%    2 MiB 967.0kB/s    00:02   
[111/129] Fetching vmaf-2.3.0_2.pkg: 100%  278 KiB 284.2kB/s    00:01   
[112/129] Fetching libx264-0.163.3060.pkg: 100%  679 KiB 694.9kB/s    00:01   
[113/129] Fetching libvdpau-1.4.pkg: 100%   56 KiB  57.8kB/s    00:01   
[114/129] Fetching libva-2.13.0_1.pkg: 100%  162 KiB 165.4kB/s    00:01   
[115/129] Fetching libv4l-1.20.0_2.pkg: 100%  363 KiB 372.1kB/s    00:01   
[116/129] Fetching argp-standalone-1.3_4.pkg:  47%   16 KiB  16.4kB/s    00:01 E[116/129] Fetching argp-standalone-1.3_4.pkg: 100%   34 KiB  34.5kB/s    00:01   
[117/129] Fetching libtheora-1.1.1_7.pkg: 100%  174 KiB 178.4kB/s    00:01   
[118/129] Fetching libvorbis-1.3.7_2,3.pkg: 100%  346 KiB 353.8kB/s    00:01   
[119/129] Fetching libogg-1.3.5,4.pkg: 100%  193 KiB 197.3kB/s    00:01   
[120/129] Fetching libass-0.15.2.pkg: 100%  139 KiB 142.7kB/s    00:01   
[121/129] Fetching dav1d-0.9.2.pkg: 100%  463 KiB 474.3kB/s    00:01   
[122/129] Fetching aom-3.2.0_1.pkg: 100%    3 MiB   1.8MB/s    00:02   
[123/129] Fetching opus-1.3.1.pkg: 100%  331 KiB 339.0kB/s    00:01   
[124/129] Fetching lame-3.100_3.pkg: 100%  360 KiB 369.0kB/s    00:01   
[125/129] Fetching webp-1.2.1.pkg: 100%  398 KiB 408.0kB/s    00:01   
[126/129] Fetching giflib-5.2.1.pkg: 100%  232 KiB 237.4kB/s    00:01   
[127/129] Fetching libpci-3.7.0_1.pkg: 100%   53 KiB  54.2kB/s    00:01   
[128/129] Fetching desktop-file-utils-0.26_1.pkg:  35%   16 KiB  16.4kB/s    00:[128/129] Fetching desktop-file-utils-0.26_1.pkg: 100%   45 KiB  45.7kB/s    00:01   
[129/129] Fetching libXmu-1.1.3,1.pkg: 100%   95 KiB  97.5kB/s    00:01   
Checking integrity... done (0 conflicting)
[1/129] Installing xorgproto-2021.5...
[1/129] Extracting xorgproto-2021.5: 100%
[2/129] Installing libXdmcp-1.1.3...
[2/129] Extracting libXdmcp-1.1.3: 100%
pkg: Cannot open /dev/null:No such file or directory
[3/129] Installing libXau-1.0.9...
[3/129] Extracting libXau-1.0.9: 100%
pkg: Cannot open /dev/null:No such file or directory
[4/129] Installing libpthread-stubs-0.4...
[4/129] Extracting libpthread-stubs-0.4: 100%
[5/129] Installing indexinfo-0.3.1...
[5/129] Extracting indexinfo-0.3.1: 100%
[6/129] Installing libxcb-1.14_1...
[6/129] Extracting libxcb-1.14_1: 100%
pkg: Cannot open /dev/null:No such file or directory
[7/129] Installing png-1.6.37_1...
[7/129] Extracting png-1.6.37_1: 100%
pkg: Cannot open /dev/null:No such file or directory
[8/129] Installing mpdecimal-2.5.1...
[8/129] Extracting mpdecimal-2.5.1: 100%
pkg: Cannot open /dev/null:No such file or directory
[9/129] Installing readline-8.1.1...
[9/129] Extracting readline-8.1.1: 100%
pkg: Cannot open /dev/null:No such file or directory
[10/129] Installing libffi-3.3_1...
[10/129] Extracting libffi-3.3_1: 100%
pkg: Cannot open /dev/null:No such file or directory
[11/129] Installing gettext-runtime-0.21...
[11/129] Extracting gettext-runtime-0.21: 100%
pkg: Cannot open /dev/null:No such file or directory
[12/129] Installing libX11-1.7.2,1...
[12/129] Extracting libX11-1.7.2,1: 100%
pkg: Cannot open /dev/null:No such file or directory
[13/129] Installing libfontenc-1.1.4...
[13/129] Extracting libfontenc-1.1.4: 100%
pkg: Cannot open /dev/null:No such file or directory
[14/129] Installing freetype2-2.11.1...
[14/129] Extracting freetype2-2.11.1: 100%
pkg: Cannot open /dev/null:No such file or directory
[15/129] Installing expat-2.4.3...
[15/129] Extracting expat-2.4.3: 100%
pkg: Cannot open /dev/null:No such file or directory
[16/129] Installing libxml2-2.9.12...
[16/129] Extracting libxml2-2.9.12: 100%
pkg: Cannot open /dev/null:No such file or directory
[17/129] Installing python38-3.8.12_1...
[17/129] Extracting python38-3.8.12_1: 100%
pkg: Cannot open /dev/null:No such file or directory
[18/129] Installing pcre-8.45...
[18/129] Extracting pcre-8.45: 100%
pkg: Cannot open /dev/null:No such file or directory
[19/129] Installing libiconv-1.16...
[19/129] Extracting libiconv-1.16: 100%
pkg: Cannot open /dev/null:No such file or directory
[20/129] Installing libICE-1.0.10,1...
[20/129] Extracting libICE-1.0.10,1: 100%
pkg: Cannot open /dev/null:No such file or directory
[21/129] Installing libXext-1.3.4,1...
[21/129] Extracting libXext-1.3.4,1: 100%
pkg: Cannot open /dev/null:No such file or directory
[22/129] Installing libXfixes-6.0.0...
[22/129] Extracting libXfixes-6.0.0: 100%
pkg: Cannot open /dev/null:No such file or directory
[23/129] Installing mkfontscale-1.2.1...
[23/129] Extracting mkfontscale-1.2.1: 100%
[24/129] Installing fontconfig-2.13.94_1,1...
pkg: Cannot open /dev/null:No such file or directory
 
Also the file /etc/jail.conf. This is on the host right ?

Code:
# cat /etc/jail.conf                   
/etc/jail.conf

allow.nomount;
exec.clean;
mount.devfs;
host.hostname = "$name.your-host-name.lan";
path = "/zroot/jails/${name}/root";
#securelevel = 3;

firefox {
    ip4.addr = "10.0.0.2";
    #exec.start = "/bin/sh /home/firefox/run-firefox";
    #exec.jail_user = "firefox";
    persist;
    devfs_ruleset = 5;
}
 
T-Daemon
Sorry I should have asked this in my previous post. I am again getting a little confused

Code:
# /etc/rc.conf
   2
   3 #
   4 # Among other thigns you set up in rc.conf, the following is minimum required for jail networking.
   5 #
   6 # We use the 10.0.0.0/29 range just as an example for up to 6 jails
   7 #
   8 cloned_interfaces=lo1
   9 ifconfig_lo1_aliases="10.0.0.1-6/29"
  10
  11 # And this to enable pf rules for NAT
  12 pf_enable="YES"
  13 pf_rules="/etc/pf.conf"

Is this the /etc/rc.conf of the host or the Jail ?

Code:
# /etc/pf.conf
   2
   3 # This is for re0 interface, so replace with whatever you have, like em0, igb0, ...
   4 extif = "re0"
   5 intif = "lo1"
   6
   7 set skip on lo
   8 set state-policy if-bound
   9
  10 nat on $extif inet from ($intif) to ! ($intif) -> ($extif)

Again is this the /etc/pf.conf of host or he jail ?
Code:
# /etc/devfs.rules

[devfsrules_desktop_jail=5]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path 'mixer*' unhide
add path 'dsp*' unhide

/etc/devfs.rules on the host or jail ?

This is not a newbie thing. After I understand this far I will ask about the next steps later.
 
T-Daemon

This is my /etc/pf.conf


Code:
block all
pass out proto { tcp udp } to port { 53 80 443 995 6697 123 }
pass out inet proto icmp icmp-type { echoreq }
extif = "re0"
intif = "lo1"
set skip on lo
set state-policy if-bound
nat on $extif inet from ($intif) to ! ($intif) -> ($extif)

I am getting this error

Code:
# pfctl -f /etc/pf.conf
/etc/pf.conf:11: Rules must be in order: options, normalization, queueing, translation, filtering
pfctl: Syntax error in config file: pf rules not loaded
 
Replicated the pf(4) rules from the wiki, those work just fine.

What's in line 11?
This is my /etc/pf.conf

Code:
$ cat /etc/pf.conf
### block in all
### pass out all keep state

block all
pass out proto { tcp udp } to port { 53 80 443 995 6697 123 }
pass out inet proto icmp icmp-type { echoreq }
extif = "re0"
intif = "lo1"
set skip on lo
set state-policy if-bound
nat on $extif inet from ($intif) to ! ($intif) -> ($extif)
 
T-Daemon
I don't want to give up. I was using Firefox and almost all network facing apps inside a firejail sandbox under Linux.
Kindly reply when you have free time.

This was how my /etc/pf.conf looked before

Code:
$ cat /etc/pf.conf
block all
pass out proto { tcp udp } to port { 53 80 443 995 6697 123 }
pass out inet proto icmp icmp-type { echoreq }

This is how my /etc/pf.conf looks after adding rules from the wiki

Code:
$ cat /etc/pf.conf
block all
pass out proto { tcp udp } to port { 53 80 443 995 6697 123 }
pass out inet proto icmp icmp-type { echoreq }
extif = "re0"
intif = "lo1"
set skip on lo
set state-policy if-bound
nat on $extif inet from ($intif) to ! ($intif) -> ($extif)

I added the following (from the wiki)

Code:
extif = "re0"

intif = "lo1"

set skip on lo

set state-policy if-bound

nat on $extif inet from ($intif) to ! ($intif) -> ($extif)
 
Kindly reply when you have free time.
Sure, no problem. Yesterday, after my last post I had no time get back to forums.

To the subject, I'm not familiar with pf(4), but after reading in the handbook the pf chapter, and taking the error message in count, the filtering must be placed last in /etc/pf.config:
Code:
extif = "re0"
intif = "lo1"
set skip on lo
set state-policy if-bound
nat on $extif inet from ($intif) to ! ($intif) -> ($extif)
block all
pass out proto { tcp udp } to port { 53 80 443 995 6697 123 }
pass out inet proto icmp icmp-type { echoreq }
 
Okay now the PF issue is solved. The "init script" is supposed to be created on the host right ?

Have I done it properly ?

Code:
$ cat /home/home/Desktop/firefoxjail
#!/bin/sh
 export DISPLAY=:0.0
 /usr/local/bin/firefox > /dev/null &

Now I am getting stuck at this step

Code:
root@firefox:~ # chown firefox:firefox /home/firefox/run-firefox
chown: /home/firefox/run-firefox: No such file or directory

Note : ^^ I am inside the jail.
 
Okay forget about that. All that is supposed to be done inside the jail.
I have complete all the steps including

And that's it. We stop the jail with jail -r firefox , uncomment the exec. bits from jail.conf, comment the persist bit, and the jail is almost ready to run. Finally:



Toggle line numbers 1 # Allow jails to talk to xorg
2 xhost +
3
4 # Mount the host's X unix socket into the jail
5 mount_nullfs /tmp/.X11-unix /zroot/jails/firefox/root/tmp/.X11-unix
6
7 # And finally make the jail's root readonly:
8 zfs set readonly=on zroot/jails/firefox/root
I dont know but this is the last remaining issue

Code:
jail -c firefox
firefox: created
root@home:/home/home # /home/firefox/run-firefox: /usr/local/bin/firefox: not found
 
Check if www/firefox is installed.

From host:
Code:
# pkg -c /zroot/jails/firefox/root info -E firefox
Code:
# pkg -c /zroot/jails/firefox/root info -E firefox
pkg: No package(s) matching firefox
So I tried to install Firefox again but an error this time

Code:
# pkg -c /zroot/jails/firefox/root install firefox xauth liberation-fonts-ttf
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 106 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    adwaita-icon-theme: 40.1.1
    aom: 3.2.0_1
    argp-standalone: 1.3_4
    argyllcms: 1.9.2_5
    at-spi2-atk: 2.34.2
    at-spi2-core: 2.36.0
    atk: 2.36.0
    avahi-app: 0.8
    ca_root_nss: 3.71
    cairo: 1.17.4,3
    colord: 1.3.5_1
    cups: 2.3.3op2
    dav1d: 0.9.2
    dbus: 1.12.20_5
    dbus-glib: 0.112
    dejavu: 2.37_1
    desktop-file-utils: 0.26_1
    encodings: 1.0.5,1
    ffmpeg: 4.4.1_3,1
    firefox: 97.0_3,2
    font-bh-ttf: 1.0.3_4
    font-misc-ethiopic: 1.0.4
    font-misc-meltho: 1.0.3_4
    fontconfig: 2.13.94_1,1
    fribidi: 1.0.11
    gdbm: 1.22
    gdk-pixbuf2: 2.40.0
    giflib: 5.2.1
    glib: 2.70.3,2
    gmp: 6.2.1
    gnome_subr: 1.0
    gnutls: 3.6.16
    graphite2: 1.3.14
    gsettings-desktop-schemas: 41.0
    gtk-update-icon-cache: 3.24.26_1
    gtk3: 3.24.31
    harfbuzz: 3.2.0
    hicolor-icon-theme: 0.17
    icu: 70.1_1,1
    jbigkit: 2.1_1
    jpeg-turbo: 2.1.1_1
    lame: 3.100_3
    lcms2: 2.12
    libSM: 1.2.3,1
    libXScrnSaver: 1.2.3_2
    libXcomposite: 0.4.5,1
    libXcursor: 1.2.0
    libXdamage: 1.1.5
    libXft: 2.3.4
    libXi: 1.8,1
    libXinerama: 1.1.4_2,1
    libXmu: 1.1.3,1
    libXrandr: 1.5.2
    libXrender: 0.9.10_2
    libXt: 1.2.1,1
    libXtst: 1.2.3_2
    libXxf86vm: 1.1.4_3
    libass: 0.15.2
    libdaemon: 0.14_1
    libdrm: 2.4.109,1
    libedit: 3.1.20210216,1
    libepoll-shim: 0.0.20210418
    libepoxy: 1.5.9
    liberation-fonts-ttf: 2.1.5,2
    libevent: 2.1.12
    libglvnd: 1.4.0
    libidn2: 2.3.2
    libogg: 1.3.5,4
    libpaper: 1.1.28
    libpci: 3.7.0_1
    libpciaccess: 0.16
    librsvg2-rust: 2.52.5_1
    libtasn1: 4.18.0
    libtheora: 1.1.1_7
    libudev-devd: 0.5.0
    libunistring: 0.9.10_1
    libv4l: 1.20.0_2
    libva: 2.13.0_1
    libvdpau: 1.4
    libvorbis: 1.3.7_2,3
    libvpx: 1.11.0
    libx264: 0.163.3060
    libxkbcommon: 1.3.1
    nettle: 3.7.3
    nspr: 4.33
    nss: 3.75
    opus: 1.3.1
    p11-kit: 0.24.0
    pango: 1.48.11
    pciids: 20211124
    pixman: 0.40.0_1
    polkit: 0.120_1
    shared-mime-info: 2.0_2
    spidermonkey78: 78.9.0_5
    sqlite3: 3.35.5_4,1
    tiff: 4.3.0
    tpm-emulator: 0.7.4_2
    trousers: 0.3.14_3
    vmaf: 2.3.0_2
    wayland: 1.20.0
    webp: 1.2.1
    x265: 3.4_2
    xauth: 1.1
    xkeyboard-config: 2.34
    xorg-fonts-truetype: 7.7_1
    xvid: 1.3.7,1

Number of packages to be installed: 106

The process will require 827 MiB more space.

Proceed with this action? [y/N]: y
[1/106] Installing fontconfig-2.13.94_1,1...
pkg: Cannot open /dev/null:No such file or directory
 
Execute from host:
Code:
# mount_nullfs /dev   /zroot/jails/firefox/root/dev
Code:
# mount_nullfs /dev   /zroot/jails/firefox/root/dev
root@home:/home/home # pkg -c /zroot/jails/firefox/root install firefox xauth liberation-fonts-ttf
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 106 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    adwaita-icon-theme: 40.1.1
    aom: 3.2.0_1
    argp-standalone: 1.3_4
    argyllcms: 1.9.2_5
    at-spi2-atk: 2.34.2
    at-spi2-core: 2.36.0
    atk: 2.36.0
    avahi-app: 0.8
    ca_root_nss: 3.71
    cairo: 1.17.4,3
    colord: 1.3.5_1
    cups: 2.3.3op2
    dav1d: 0.9.2
    dbus: 1.12.20_5
    dbus-glib: 0.112
    dejavu: 2.37_1
    desktop-file-utils: 0.26_1
    encodings: 1.0.5,1
    ffmpeg: 4.4.1_3,1
    firefox: 97.0_3,2
    font-bh-ttf: 1.0.3_4
    font-misc-ethiopic: 1.0.4
    font-misc-meltho: 1.0.3_4
    fontconfig: 2.13.94_1,1
    fribidi: 1.0.11
    gdbm: 1.22
    gdk-pixbuf2: 2.40.0
    giflib: 5.2.1
    glib: 2.70.3,2
    gmp: 6.2.1
    gnome_subr: 1.0
    gnutls: 3.6.16
    graphite2: 1.3.14
    gsettings-desktop-schemas: 41.0
    gtk-update-icon-cache: 3.24.26_1
    gtk3: 3.24.31
    harfbuzz: 3.2.0
    hicolor-icon-theme: 0.17
    icu: 70.1_1,1
    jbigkit: 2.1_1
    jpeg-turbo: 2.1.1_1
    lame: 3.100_3
    lcms2: 2.12
    libSM: 1.2.3,1
    libXScrnSaver: 1.2.3_2
    libXcomposite: 0.4.5,1
    libXcursor: 1.2.0
    libXdamage: 1.1.5
    libXft: 2.3.4
    libXi: 1.8,1
    libXinerama: 1.1.4_2,1
    libXmu: 1.1.3,1
    libXrandr: 1.5.2
    libXrender: 0.9.10_2
    libXt: 1.2.1,1
    libXtst: 1.2.3_2
    libXxf86vm: 1.1.4_3
    libass: 0.15.2
    libdaemon: 0.14_1
    libdrm: 2.4.109,1
    libedit: 3.1.20210216,1
    libepoll-shim: 0.0.20210418
    libepoxy: 1.5.9
    liberation-fonts-ttf: 2.1.5,2
    libevent: 2.1.12
    libglvnd: 1.4.0
    libidn2: 2.3.2
    libogg: 1.3.5,4
    libpaper: 1.1.28
    libpci: 3.7.0_1
    libpciaccess: 0.16
    librsvg2-rust: 2.52.5_1
    libtasn1: 4.18.0
    libtheora: 1.1.1_7
    libudev-devd: 0.5.0
    libunistring: 0.9.10_1
    libv4l: 1.20.0_2
    libva: 2.13.0_1
    libvdpau: 1.4
    libvorbis: 1.3.7_2,3
    libvpx: 1.11.0
    libx264: 0.163.3060
    libxkbcommon: 1.3.1
    nettle: 3.7.3
    nspr: 4.33
    nss: 3.75
    opus: 1.3.1
    p11-kit: 0.24.0
    pango: 1.48.11
    pciids: 20211124
    pixman: 0.40.0_1
    polkit: 0.120_1
    shared-mime-info: 2.0_2
    spidermonkey78: 78.9.0_5
    sqlite3: 3.35.5_4,1
    tiff: 4.3.0
    tpm-emulator: 0.7.4_2
    trousers: 0.3.14_3
    vmaf: 2.3.0_2
    wayland: 1.20.0
    webp: 1.2.1
    x265: 3.4_2
    xauth: 1.1
    xkeyboard-config: 2.34
    xorg-fonts-truetype: 7.7_1
    xvid: 1.3.7,1

Number of packages to be installed: 106

The process will require 827 MiB more space.

Proceed with this action? [y/N]: y
[1/106] Installing fontconfig-2.13.94_1,1...
[1/106] Extracting fontconfig-2.13.94_1,1:   0%
pkg: Fail to create /usr/local/share/licenses/fontconfig-2.13.94_1,1:Read-only file system
[1/106] Extracting fontconfig-2.13.94_1,1: 100%
 
Code:
# jail -c firefox
firefox: created
root@home:/home/home # Error: cannot open display: :0.0

So I repeated
Code:
# xhost +

access control disabled, clients can connect from any host

But same error.
 
Back
Top