Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| jailingguiapplications [2017/08/05 09:17] – VladimirKrstulja | jailingguiapplications [2021/04/29 11:37] (current) – Fix a typo DanielEbdrup | ||
|---|---|---|---|
| Line 87: | Line 87: | ||
| # We use the 10.0.0.0/29 range just as an example for up to 6 jails | # We use the 10.0.0.0/29 range just as an example for up to 6 jails | ||
| # | # | ||
| - | cloned_interfaces = lo1 | + | cloned_interfaces=lo1 |
| - | ifconfig_lo1_aliases = " | + | ifconfig_lo1_aliases=" |
| # And this to enable pf rules for NAT | # And this to enable pf rules for NAT | ||
| Line 130: | Line 130: | ||
| So now we're ready to start the jail and jexec into it for final setup. | So now we're ready to start the jail and jexec into it for final setup. | ||
| + | |||
| + | <callout type=" | ||
| + | **A note on DISPLAY env variable** | ||
| + | |||
| + | The below approach uses a custom shell script that's started by the jail's '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | Don't forget to '' | ||
| + | |||
| + | </ | ||
| <code bash> | <code bash> | ||
| Line 198: | Line 209: | ||
| < | < | ||
| exec.prestart = "mount | grep ' on / | exec.prestart = "mount | grep ' on / | ||
| + | </ | ||
| + | |||
| + | ===== Integrating host-side browser launchers with jailed Firefox ===== | ||
| + | |||
| + | Various launchers will want to launch local '' | ||
| + | |||
| + | - Local " | ||
| + | - A sudo-enabled NOPASSWD script that's called by the local " | ||
| + | - A '' | ||
| + | |||
| + | As a simple example, assuming local " | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | # This is / | ||
| + | |||
| + | if [ -z " | ||
| + | exit 1 | ||
| + | fi | ||
| + | sudo / | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | # This is / | ||
| + | |||
| + | if [ -z " | ||
| + | exit 1 | ||
| + | fi | ||
| + | jexec -U firefox firefox firefox $1 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # In sudoers (called by sudo visudo), for example: | ||
| + | |||
| + | %wheel ALL=(ALL) NOPASSWD: / | ||
| </ | </ | ||