EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS and more

Vinícius Zavam
Vinícius ZavamSystems Engineer
(auto)Installing BSD Systems
Cases using pfSense, TrueNAS, and more
EuroBSDCon 2023, Coimbra (Portugal) – https://2023.eurobsdcon.org – Vinícius Zavam – https://keybase.io/egypcio – 0x415C653413B43475
https://2021.eurobsdcon.org
tl;dr;
iPXE
(auto)Installers
FreeBSD;
pfSense;
TrueNAS;
ELKE
Demonstration
https://youtube.com/watch?v=7F3UwfNB2JA
https://slideshare.net/egypcio/eurobsdcon-2021-autoinstalling-bsd-systems
tl;dr;
● You can build an alternative solution yourself ]=)
– https://cgit.freebsd.org/src/tree/release
release.sh
${TARGET}/make-memstick.sh
${TARGET}/mkisoimages.sh
© IVJRM, Maryam Rahati
iPXE
● Full PXE Implementation
– HTTP(s);
– IPv6;
– iSCSI; FCoE; …
– VLAN;
● OEM (original equipment manufacturer)
● Expansion ROM
– Broadcom;
– Intel;
– VMware;
● Chain Loading
– UNDI (universal network driver interface);
– EFI (extensible firmware interface); UEFI (unified ...);
– Scripting Support;
● ISO-image or Bootable USB Stick
iPXE
● Cryptography (protocols, ciphers, hashing, …)
– TLSv1.2;
– RSA, RSA/DHE;
– AES-256-GCM;
– SHA-512/256;
● Images Trust and Verification
○ iPXE supports code signing;
○ Verifies the authenticity and integrity of downloaded files;
○ https://ipxe.org/cmd/imgtrust
● Root Certificates
○ In the default configuration, iPXE trusts only the "iPXE root CA";
○ This root CA is used to cross-sign the standard Mozilla list of public CA certificates;
○ iPXE will therefore automatically trust the same set of certificates as Firefox;
○ You can change the list of trusted root certificates when you build iPXE using the TRUST build parameter;
■ FreeBSD's port net/ipxe allows you to set IPXE_MAKE_ARGS for that purpose;
■ … in a similar way, you can additionally set IPXE_BUILDCFG to customize its buildcfg
https://ipxe.org/crypto
#!ipxe
#
# iPXE; autoexec.ipxe
#
dhcp && route
ntp 10.0.123.11
chain --autofree --replace https://boot.netboot.xyz/ipxe/netboot.xyz.efi
iPXE
iPXE
#!ipxe
#
# iPXE; boot.ipxe
#
chain --autofree boot.ipxe.cfg ||
isset ${hostname} && chain --autofree --replace ${boot-dir}/host-${hostname}.ipxe ||
chain --autofree --replace ${boot-dir}/mac-${mac:hexraw}.ipxe ||
chain --autofree --replace ${menu-url} ||
iPXE
https://ipxe.org/examples
iPXE
(auto)Installers
● FreeBSD
– https://www.freebsd.org/copyright
– https://www.freebsd.org/copyright/freebsd-license
● pfSense
– https://www.pfsense.org/about-pfsense
– https://www.pfsense.org/trademarks.html
● TrueNAS
– https://www.truenas.com/docs/core/gettingstarted/useragreements/coreeula
– https://www.truenas.com/docs/core/gettingstarted/useragreements/enterpriseeula
(auto)Installers
● FreeBSD-14.0-CURRENT-amd64-20230323-b5d43972e394-261711-disc1.iso
– diskless(8)
exports(5);
nfsd(8);
pxeboot(8);
tftpd(8);
– bsdinstall(8)
bsdconfig(8);
- accounts
- disks partitioning
- networking
- time and date, …
/etc/install.cfg
- preamble (env. variables)
- setup
(auto)Installers
#
# FreeBSD; /etc/install.cfg
#
export DISTRIBUTIONS="base.txz kernel.txz"
export PARTITIONS="da0"
export nonInteractive="YES”
#!/bin/sh
sysrc hostname="tortuga.hue.br"
sysrc ifconfig_vtnet0=DHCP
sysrc sshd_enable=YES
sysrc ntpd_enable=YES
reboot
(auto)Installers
● pfSense-CE-2.7.0-DEVELOPMENT-amd64-20230214-0600.iso
– https://github.com/pfsense/pfsense
recover_configxml.sh
– https://github.com/pfsense/freebsd-src
/tmp/buildroom
/etc/installerconfig
(auto)Installers
#
# pfSense; /etc/installerconfig
#
export BSDINSTALL_DISTDIR="/usr/freebsd-dist"
export DISTRIBUTIONS=base.txz
export FORCE_BOOTMETHOD="UEFI"
export PARTITIONS=da0
export PARTMODE="Auto (UFS) UEFI"
export nonInteractive="YES”
(auto)Installers
#
# pfSense; /etc/installerconfig
#
export BSDINSTALL_DISTDIR="/usr/freebsd-dist"
export DEBUG=
export DISTRIBUTIONS=base.txz
export FORCE_BOOTMETHOD="UEFI"
export PARTITIONS=da0
export PARTMODE="Auto (UFS) UEFI"
export WORKAROUND_GPTACTIVE=1
export nonInteractive="YES”
#!/bin/sh
touch /cf/conf/___POC
echo "Secos e Molhados" >> /cf/conf/tropicalia.txt
(auto)Installers
● TrueNAS-13.1-MASTER-202303200713-27864d42a.iso
– https://github.com/truenas/os
/etc/install.sh
/etc/install.conf
– https://github.com/truenas/core-build
/boot/loader.conf
- mdroot_{name,type}=
- vfs.root.mountfrom=
md(4); mdmfs(8);
makefs(8); mkuzip(8); geom_uzip(4);
mount.conf(5);
(auto)Installers
#
# TrueNAS; /etc/install.conf
#
disk=da0
password=NetBSDover9000malandramente
whenDone=reboot
Elke Maravilha
https://harpersbazaar.uol.com.br/cultura/aos-71-anos-morre-a-performer-elke-maravilha/
ELKE (Encrypted and Lovely Kage Environment)
● https://cgit.freebsd.org/src/tree
– usr.sbin/bsdconfig
– usr.sbin/bsdinstall
● INSTALLING
– sshd
gpart(8); newfs(8); newfs_msdos(8); tar(1); efibootmgr(8);
makefs(8); mkuzip(8); chroot(1); jail(1);
ssh-keygen(1); sshd_config(5); sysrc(8); …
– elke
dd(1); geli(8); gpart(8); zpool(8); zfs(8);
tar(1); sysrc(8); pkg(8); chroot(1); jail(1);
ssh-keygen(1); sshd_config(5); …
ELKE (Encrypted and Lovely Kage Environment)
● CONFIGURING
– fstab(5);
– loader.conf(5);
kern.geom.eli.tries=0
vfs.root.mountfrom="ufs:/dev/gpt/sshd"
– periodic.conf(5);
– pf.conf(5);
– rc.conf(5);
root_rw_mount=NO
– security(7);
– tor(1);
ClientOnionAuthDir;
HiddenServiceDir/authorized_clients/
https://community.torproject.org/onion-services/advanced/client-auth
– ttys(5);
"insecure" console
– zfsprops(7);
encryption=aes-256-gcm
ELKE (Encrypted and Lovely Kage Environment)
ELKE (Encrypted and Lovely Kage Environment)
ELKE (Encrypted and Lovely Kage Environment)
● UNLOCKING
– ssh(1);
HostKeyAlias; StrictHostKeyChecking; VerifyHostKeyDNS;
ProxyCommand; ProxyJump; UserKnownHostsFile;
– kldload(8);
– geli(8);
– zpool-import(8); zfs-load-key(8);
– kenv(1); reboot(8);
vfs.root.mountfrom="zfs:tangamandapio/ROOT/main"
ELKE (Encrypted and Lovely Kage Environment)
ELKE (Encrypted and Lovely Kage Environment)
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS and more
Demonstration
https://youtu.be/kMwnRBy6vkQ https://youtu.be/J1txpe4YcNU
"Eu já disse e vou repetir quantas vezes você precisar, como você vai conseguir
fazer isso, onde vai procurar e que documentação vai seguir de referência. Pro seu
bem, o que eu não vou é colar o comando que você vai simplesmente copiar,
executar, agradecer porque funcionou e não terá aprendido nada. Me leia com
atenção e você vai descobrir por conta própria exatamente como fazer, agora
entregar de mão beijada eu não vou e espero que ninguém faça isso. E acredite em
mim é porque gosto de você."
flames > /dev/null
--
saudações,
irado furioso com tudo
Linux User 179402/FreeBSD BSD50853/FUG-BR 154
100% Miko$hit-free
https://www.freebsdbrasil.com.br/empresa/irado-jorge.html
(auto)Installing BSD Systems
Cases using pfSense, TrueNAS, and more
EuroBSDCon 2023, Coimbra (Portugal) – https://2023.eurobsdcon.org – Vinícius Zavam – https://keybase.io/egypcio – 0x415C653413B43475
1 de 30

Recomendados

ONOS SDN Controller - Clustering Tests & Experiments por
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments Eueung Mulyana
1.8K visualizações50 slides
9 creating cent_os 7_mages_for_dpdk_training por
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
2.7K visualizações22 slides
Dev ops por
Dev opsDev ops
Dev opsTom Hall
291 visualizações62 slides
FreeBSD ports por
FreeBSD portsFreeBSD ports
FreeBSD portswdv4758h
1.8K visualizações67 slides
EuroBSDCon 2021 - (auto)Installing BSD Systems por
EuroBSDCon 2021 - (auto)Installing BSD SystemsEuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsVinícius Zavam
263 visualizações39 slides
A million ways to provision embedded linux devices por
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devicesMender.io
829 visualizações16 slides

Mais conteúdo relacionado

Similar a EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS and more

Programming OpenRISC on Altera De0_nano por
Programming OpenRISC on Altera De0_nanoProgramming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nanoYi-Chiao
2.4K visualizações27 slides
How to Install Ghost (CMS) MEMO por
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMONaoto MATSUMOTO
731 visualizações3 slides
UP Board AI Core Configuration memo por
UP Board AI Core Configuration memoUP Board AI Core Configuration memo
UP Board AI Core Configuration memoNaoto MATSUMOTO
284 visualizações2 slides
5. boot process por
5. boot process5. boot process
5. boot processMarian Marinov
8.2K visualizações17 slides
ERP System Implementation Kubernetes Cluster with Sticky Sessions por
ERP System Implementation Kubernetes Cluster with Sticky Sessions ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions Chanaka Lasantha
112 visualizações24 slides
Nise BOSH in Action por
Nise BOSH in ActionNise BOSH in Action
Nise BOSH in Actioni_yudai
3.8K visualizações23 slides

Similar a EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS and more(20)

Programming OpenRISC on Altera De0_nano por Yi-Chiao
Programming OpenRISC on Altera De0_nanoProgramming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nano
Yi-Chiao2.4K visualizações
How to Install Ghost (CMS) MEMO por Naoto MATSUMOTO
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMO
Naoto MATSUMOTO731 visualizações
UP Board AI Core Configuration memo por Naoto MATSUMOTO
UP Board AI Core Configuration memoUP Board AI Core Configuration memo
UP Board AI Core Configuration memo
Naoto MATSUMOTO284 visualizações
5. boot process por Marian Marinov
5. boot process5. boot process
5. boot process
Marian Marinov8.2K visualizações
ERP System Implementation Kubernetes Cluster with Sticky Sessions por Chanaka Lasantha
ERP System Implementation Kubernetes Cluster with Sticky Sessions ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions
Chanaka Lasantha112 visualizações
Nise BOSH in Action por i_yudai
Nise BOSH in ActionNise BOSH in Action
Nise BOSH in Action
i_yudai3.8K visualizações
Globus toolkit4installationguide por Adarsh Patil
Globus toolkit4installationguideGlobus toolkit4installationguide
Globus toolkit4installationguide
Adarsh Patil361 visualizações
PHP selber bauen por Walter Ebert
PHP selber bauenPHP selber bauen
PHP selber bauen
Walter Ebert4.7K visualizações
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift por Tomohiro Kumagai
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswiftmacOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
Tomohiro Kumagai677 visualizações
Linux Containers From Scratch por joshuasoundcloud
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
joshuasoundcloud5.2K visualizações
Dependencies Managers in C/C++. Using stdcpp 2014 por biicode
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode4.4K visualizações
nginx + uwsgi emperor + bottle por Jordi Soucheiron
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
Jordi Soucheiron3.6K visualizações
Ci For The Web 2.0 Guy Or Gal por Chad Woolley
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
Chad Woolley2.3K visualizações
Python Deployment with Fabric por andymccurdy
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy34K visualizações
Node.js basics por Ben Lin
Node.js basicsNode.js basics
Node.js basics
Ben Lin1.1K visualizações
3. configuring a compute node for nfv por videos
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
videos2.5K visualizações
NFD9 - Matt Peterson, Data Center Operations por Cumulus Networks
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center Operations
Cumulus Networks1K visualizações
Linux por Kavi Bharathi R
LinuxLinux
Linux
Kavi Bharathi R1.9K visualizações
Automatic systems installations and change management wit FAI - Talk for Netw... por Henning Sprang
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...
Henning Sprang2.2K visualizações
2015.10.05 Updated > Network Device Development - Part 1: Switch por Cheng-Yi Yu
2015.10.05 Updated > Network Device Development - Part 1: Switch2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch
Cheng-Yi Yu4.1K visualizações

Último

Info Session November 2023.pdf por
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdfAleksandraKoprivica4
12 visualizações15 slides
Vertical User Stories por
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 visualizações16 slides
Kyo - Functional Scala 2023.pdf por
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
368 visualizações92 slides
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... por
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...James Anderson
85 visualizações32 slides
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ... por
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation
29 visualizações9 slides
Special_edition_innovator_2023.pdf por
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
17 visualizações6 slides

Último(20)

Info Session November 2023.pdf por AleksandraKoprivica4
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdf
AleksandraKoprivica412 visualizações
Kyo - Functional Scala 2023.pdf por Flavio W. Brasil
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdf
Flavio W. Brasil368 visualizações
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... por James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 visualizações
Special_edition_innovator_2023.pdf por WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2217 visualizações
Serverless computing with Google Cloud (2023-24) por wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 visualizações
SAP Automation Using Bar Code and FIORI.pdf por Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP23 visualizações
Melek BEN MAHMOUD.pdf por MelekBenMahmoud
Melek BEN MAHMOUD.pdfMelek BEN MAHMOUD.pdf
Melek BEN MAHMOUD.pdf
MelekBenMahmoud14 visualizações
Five Things You SHOULD Know About Postman por Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 visualizações
Scaling Knowledge Graph Architectures with AI por Enterprise Knowledge
Scaling Knowledge Graph Architectures with AIScaling Knowledge Graph Architectures with AI
Scaling Knowledge Graph Architectures with AI
Enterprise Knowledge30 visualizações
Evolving the Network Automation Journey from Python to Platforms por Network Automation Forum
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to Platforms
Network Automation Forum13 visualizações
Ransomware is Knocking your Door_Final.pdf por Security Bootcamp
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp55 visualizações
Microsoft Power Platform.pptx por Uni Systems S.M.S.A.
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptx
Uni Systems S.M.S.A.53 visualizações
PRODUCT LISTING.pptx por angelicacueva6
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptx
angelicacueva614 visualizações
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... por Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Jasper Oosterveld18 visualizações
HTTP headers that make your website go faster - devs.gent November 2023 por Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 visualizações
Empathic Computing: Delivering the Potential of the Metaverse por Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst478 visualizações

EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS and more