惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy International News Feed
F
Full Disclosure
P
Proofpoint News Feed
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Blog of Author Tim Ferriss
T
Threatpost
L
Lohrmann on Cybersecurity
I
Intezer
S
SegmentFault 最新的问题
小众软件
小众软件
T
Threat Research - Cisco Blogs
MongoDB | Blog
MongoDB | Blog
美团技术团队
NISL@THU
NISL@THU
罗磊的独立博客
N
News | PayPal Newsroom
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 聂微东
W
WeLiveSecurity
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
Scott Helme
Scott Helme
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
S
Securelist
D
Darknet – Hacking Tools, Hacker News & Cyber Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Schneier on Security
Schneier on Security
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
U
Unit 42
The Cloudflare Blog
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Recent Announcements
Recent Announcements
D
DataBreaches.Net
量子位

seize the dev

Will Software Engineering Survive? Why is the Gmail app 700 MB? Bits of Open-Source in 2025 Parsing JSON in Forty Lines of Awk A Tricky Floating-Point Calculation Improving Date Formatting Performance in Node.js Unix is not Linux A Simple Setup for C and C++ How to Break Software
Installing FreeBSD on Oracle Cloud
Mohamed Akram · 2022-07-31 · via seize the dev

Oracle Cloud has a fairly generous free tier, but one thing it does not include is the ability to use custom images, which require a paid account. This guide will show you how to install FreeBSD (or any custom image) using an alternative method.

Note: For arm64 instances, a FreeBSD image is currently available under the partner images source when creating the instance, so you can skip the steps below unless you need a specific version.

Install

  1. Create two instances in Oracle Cloud using the default image. We will be using one for the FreeBSD server, and a temporary one for the installation process. Make sure to specify your SSH public key when creating the temporary instance.

  2. On the FreeBSD instance page, stop it if it is running, and detach the boot volume.

  3. On the temporary instance page, attach the FreeBSD instance’s boot volume as a block volume. Make sure to select Paravirtualized as the attachment type.

  4. SSH into the temporary instance. Check the path of the newly attach volume. You can do this by running lsblk and seeing which one has nothing mounted on it (it will most likely be /dev/sdb).

    Then, run the following command to install a raw FreeBSD image onto the volume. Modify the release version and the volume path as needed.

    curl https://download.freebsd.org/ftp/releases/VM-IMAGES/13.1-RELEASE/amd64/Latest/FreeBSD-13.1-RELEASE-amd64.raw.xz | xz -dc | sudo dd of=/dev/sdb bs=1M conv=fdatasync
    
  5. Once the process is complete, detach the block volume from the temporary instance.

  6. Re-attach the FreeBSD instance’s boot volume and start the instance.

Setup

Once the FreeBSD instance has booted, we can now configure it.

  1. In the instance’s page, launch a Cloud Shell connection (you may need to press Enter in the console if it appears to be stuck for a while). This will give us preliminary access and allow us to enable SSH on the new server.

  2. Run passwd to set a password for the root user - make sure to choose a strong one.

  3. Create a new user using adduser. When asked to invite the user to other groups, enter wheel to give the user root privileges.

  4. Enable and start the SSH service by running service sshd enable, followed by service sshd start.

  5. Copy your public key from your local machine using ssh-copy-id user@freebsd-instance-ip.

  6. Now you can SSH into your new FreeBSD server and do any additional setup. Enjoy!

Additional Setup

IPv6

To get IPv6 working on a FreeBSD instance on Oracle Cloud, we need support for DHCPv6, which is not yet available in FreeBSD’s DHCP client dhclient. To get around this, we can use the dual-dhclient-daemon package which supports dual-stack DHCP. You can install and enable it with the following:

pkg install dual-dhclient-daemon
sysrc dhclient_program=/usr/local/sbin/dual-dhclient

You will also need to enable IPv6 for your instance in the Oracle Cloud settings.