How I Run FreeBSD Jails
Here is a quick rundown of how I run FreeBSD jails.
Something I should have mentioned was the pf rules for forwarding traffic from the jail out to the internet. This would go in the /etc/pf.conf file:
NET_JAIL="192.168.100.0/24"
...
nat on $ext_if from $NET_JAIL to any -> ($ext_if:0)
# This assumes $ext_if is setup in the pf.conf file as well.
Here are the commands to get setup:
# setup lo1 on startup
sysrc cloned_interfaces+="lo1"
# setup zfs datasets
zfs create -o mountpoint=/usr/jails zroot/jails
zfs create zroot/jails/basejail
# install a base system
bsdinstall jail /usr/jails/basejail
# snapshot and clone
zfs snapshot zroot/jails/basejail@start
zfs clone zroot/jails/basejail@start zroot/jails/newjail
Jail configuration example:
newjail {
host.hostname = "newjail";
mount.devfs;
exec.clean;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
path = "/usr/jails/newjail";
ip4.addr = "lo1|192.168.100.100/24";
}
For custom hosting and development:
-
0/2000
-
20:10
CartierFamily
11 hours agoAndrew Schulz DESTROYS Charlamagne’s WOKE Meltdown on DOGE & Elon Musk!
87.7K84 -
33:56
The Why Files
9 days agoLegend of the 13 Crystal Skulls | From Mars to the Maya
40.6K37 -
2:56:14
TimcastIRL
4 hours agoEPSTEIN Files DROP, FBI GOES ROGUE, AG Says They COVERED UP Epstein Case w/Amber Duke | Timcast IRL
152K69 -
1:39:23
Kim Iversen
5 hours ago"Canada's Trump" Is Trudeau’s Worst Nightmare: Is Maxime Bernier the Future of Canada?
54.2K60 -
DVR
Bannons War Room
10 days agoWarRoom Live
2.65M446 -
16:06
The Rubin Report
11 hours agoProof the Islamist Threat in England Can No Longer Be Ignored | Winston Marshall
72.6K73 -
2:07:07
Robert Gouveia
8 hours agoFBI Files Coverup! Bondi FURIOUS; SCOTUS Stops Judge; Special Counsel; FBI Does
94.7K79 -
56:15
Candace Show Podcast
9 hours agoBREAKING: My FIRST Prison Phone Call With Harvey Weinstein | Candace Ep 153
153K108 -
1:56:39
Flyover Conservatives
7 hours agoROBIN D. BULLOCK | Prophetic Warning: 2030 Is Up for Grabs – If We Don’t Act Now, Disaster Awaits! | FOC SHOW
46K8 -
2:13:11
megimu32
5 hours agoON THE SUBJECT: The Epstein List & Disney Channel Original Movies Nostalgia!!
37.4K4
0 Comments