vps_-_openbsd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
vps_-_openbsd [2023/06/11 22:03] – add in doas and netwokring cpet | vps_-_openbsd [2025/04/18 06:40] (current) – [Networking] N-T hc9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{: | ||
+ | |||
+ | ====== OpenBSD on SDF VPS ====== | ||
+ | |||
+ | ===== First Steps ===== | ||
+ | |||
+ | ==== Root Password ==== | ||
+ | |||
+ | After you have installed and started your OpenBSD VPS, go to the console. | ||
+ | |||
+ | We need to interrupt the boot process by hitting the spacebar and then hitting enter after the xenstore-write connected message is shown like so: | ||
+ | |||
+ | [04-Nov-20 21:18:51] Command: r | ||
+ | | ||
+ | Connecting to System Console - To return to the menu, press ^] | ||
+ | | ||
+ | Parsing config from / | ||
+ | / | ||
+ | brconfig bridge0 add xvif412i0 | ||
+ | xenstore-write / | ||
+ | | ||
+ | boot> | ||
+ | |||
+ | We are now at the boot loader prompt, next we will boot the kernel into single-user mode like so: | ||
+ | |||
+ | boot> boot -s | ||
+ | | ||
+ | After the kernel loads you should be presented with a shell prompt similar to this: | ||
+ | |||
+ | root on sd0a (1318956d982f595b.a) swap on sd0b dump on sd0b | ||
+ | Enter pathname of shell or RETURN for sh: | ||
+ | | ||
+ | # | ||
+ | |||
+ | Next is ensuring our filesystem is clean and mounting it in read-write mode: | ||
+ | |||
+ | # fsck -p / && mount -uw / | ||
+ | /dev/sd0a (1318956d982f595b.a): | ||
+ | # | ||
+ | |||
+ | And finally you can update the root password via the passwd(1) command. | ||
+ | |||
+ | # passwd | ||
+ | Changing password for root. | ||
+ | New password: | ||
+ | Retype new password: | ||
+ | # reboot | ||
+ | |||
+ | ==== User Accounts ==== | ||
+ | |||
+ | It is also a good habit to create a regular user account for working, using " | ||
+ | |||
+ | useradd -m -G wheel username | ||
+ | |||
+ | Then immediately set its password with: | ||
+ | |||
+ | passwd username | ||
+ | |||
+ | This user will be in the " | ||
+ | |||
+ | For doas copy over the example and then edit | ||
+ | |||
+ | cp / | ||
+ | |||
+ | ==== Networking ==== | ||
+ | |||
+ | As root edit / | ||
+ | | ||
+ | vi / | ||
+ | | ||
+ | FIXME remove the inet autoconf and replace it with inet ip 255.255.255.0 | ||
+ | |||
+ | <file config suggested edit from tty bboard VPS> | ||
+ | In / | ||
+ | “inet IP-SEEN-ON-THE-VPS-MAINTENANCE-SHELL 255.255.255.0” | ||
+ | </ | ||
+ | |||
+ | As root edit /etc/mygate | ||
+ | |||
+ | vi / | ||
+ | |||
+ | Add in the gateway ip from welcome email | ||
+ | |||
+ | As root edit /etc/myname | ||
+ | |||
+ | vi / | ||
+ | |||
+ | Add in a hostname that makes sense | ||
+ | |||
+ | As root type in / | ||
+ | |||
+ | sh / | ||
+ | | ||
+ | Should now see your ip listed when doing ifconfig | ||
+ | |||
+ | Now run sysupgrade twice to get the latest version | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | * OpenBSD afterboot(8) man page is a great starting point for configuring you new system: [[https:// | ||
+ | * doas(1) is included with the base OpenBSD system and performs a similar role as the popular sudo utility: [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | $Id: VPS_NetBSD.html, | ||
vps_-_openbsd.txt · Last modified: 2025/04/18 06:40 by hc9