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 sur 30

Recommandé

ONOS SDN Controller - Clustering Tests & Experiments par
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments Eueung Mulyana
1.8K vues50 diapositives
9 creating cent_os 7_mages_for_dpdk_training par
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 vues22 diapositives
Dev ops par
Dev opsDev ops
Dev opsTom Hall
291 vues62 diapositives
FreeBSD ports par
FreeBSD portsFreeBSD ports
FreeBSD portswdv4758h
1.8K vues67 diapositives
EuroBSDCon 2021 - (auto)Installing BSD Systems par
EuroBSDCon 2021 - (auto)Installing BSD SystemsEuroBSDCon 2021 - (auto)Installing BSD Systems
EuroBSDCon 2021 - (auto)Installing BSD SystemsVinícius Zavam
265 vues39 diapositives
A million ways to provision embedded linux devices par
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 vues16 diapositives

Contenu connexe

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

Programming OpenRISC on Altera De0_nano par
Programming OpenRISC on Altera De0_nanoProgramming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nanoYi-Chiao
2.4K vues27 diapositives
How to Install Ghost (CMS) MEMO par
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMONaoto MATSUMOTO
731 vues3 diapositives
UP Board AI Core Configuration memo par
UP Board AI Core Configuration memoUP Board AI Core Configuration memo
UP Board AI Core Configuration memoNaoto MATSUMOTO
284 vues2 diapositives
5. boot process par
5. boot process5. boot process
5. boot processMarian Marinov
8.2K vues17 diapositives
ERP System Implementation Kubernetes Cluster with Sticky Sessions par
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 vues24 diapositives
Nise BOSH in Action par
Nise BOSH in ActionNise BOSH in Action
Nise BOSH in Actioni_yudai
3.8K vues23 diapositives

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

Programming OpenRISC on Altera De0_nano par Yi-Chiao
Programming OpenRISC on Altera De0_nanoProgramming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nano
Yi-Chiao2.4K vues
ERP System Implementation Kubernetes Cluster with Sticky Sessions par 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 vues
Nise BOSH in Action par i_yudai
Nise BOSH in ActionNise BOSH in Action
Nise BOSH in Action
i_yudai3.8K vues
Globus toolkit4installationguide par Adarsh Patil
Globus toolkit4installationguideGlobus toolkit4installationguide
Globus toolkit4installationguide
Adarsh Patil361 vues
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift par Tomohiro Kumagai
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswiftmacOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
Tomohiro Kumagai677 vues
Dependencies Managers in C/C++. Using stdcpp 2014 par 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 vues
Ci For The Web 2.0 Guy Or Gal par 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 vues
Python Deployment with Fabric par andymccurdy
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy34K vues
Node.js basics par Ben Lin
Node.js basicsNode.js basics
Node.js basics
Ben Lin1.1K vues
3. configuring a compute node for nfv par videos
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
videos2.5K vues
NFD9 - Matt Peterson, Data Center Operations par Cumulus Networks
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center Operations
Automatic systems installations and change management wit FAI - Talk for Netw... par 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 vues
2015.10.05 Updated > Network Device Development - Part 1: Switch par 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 vues

Dernier

DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... par
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...ShapeBlue
141 vues29 diapositives
Business Analyst Series 2023 - Week 4 Session 7 par
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
146 vues31 diapositives
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 par
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023BookNet Canada
44 vues19 diapositives
Initiating and Advancing Your Strategic GIS Governance Strategy par
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategySafe Software
184 vues68 diapositives
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue par
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueShapeBlue
265 vues23 diapositives
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlueShapeBlue
152 vues23 diapositives

Dernier(20)

DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... par ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue141 vues
Business Analyst Series 2023 - Week 4 Session 7 par DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10146 vues
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 par BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada44 vues
Initiating and Advancing Your Strategic GIS Governance Strategy par Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 vues
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue par ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue265 vues
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue152 vues
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... par BookNet Canada
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
BookNet Canada41 vues
The Role of Patterns in the Era of Large Language Models par Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li91 vues
"Node.js Development in 2024: trends and tools", Nikita Galkin par Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 vues
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... par 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 ...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... par The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT par ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue208 vues
State of the Union - Rohit Yadav - Apache CloudStack par ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue303 vues
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... par ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue199 vues
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... par ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue129 vues
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... par ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue183 vues

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