OpenBSD
Official site
I installed from
install51.iso
After installation, other OSes on the disk became unavailable; the installation guides
could not answer the question of how to install OpenBSD so as
not to wipe the others (the disk was, of course, partitioned beforehand into
separate sections for each OS, and the installation was done on the free section).
After installation
It is very unpleasant to work with the editor vi . To exit an open file you need to type:
Esc - :q! - Enter
If you have only just started studying this topic, I recommend reading the instructions for working in VI - this will save a lot of time and nerves.
To install another text editor, for example nano, you need to connect to the server from
another computer over the local network (see "Network configuration"),
since local connections are not blocked
by the firewall.
You can download the nano sources from
naon-editor.org
choose .tar.gz . Unpack it and copy it via
WinSCP
to the server. Go into the directory and install:
./configure
make
make install
If error messages appear, you most likely need to make some
files executable, for example the configure file
Read more about installing with make in the article
Configure Make Install using Linux as an example
chmod 744 file_name
Network configuration
ifconfig
will show information about the network.
If there are several network cards they will get different names based on the internal OpenBSD logic, for example msk0 and sk0. If a network cable is inserted into the card this will be shown in ifconfig as status : active.
The settings of each network interface are in the files
/etc/hostname.msk0
and
/etc/hostname.sk0
. You can view their contents with the command
cat /etc/hostname.msk0
You can replace the contents of the file, for example with inet 192.168.0.5 mask 255.255.255.0, with the command
echo "inet 192.168.0.5 mask 255.255.255.0" > /etc/hostname.msk0
If you need to obtain an ip automatically (from the provider or a local dhcp server:
echo "dhcp" > /etc/hostname.sk0
It may come as a surprise that openbsd has the
firewall enabled by default; it will not let connections to the external network through, so there is no
need to be surprised that,
for example,
urn.su
does not ping.
The firewall can be disabled by editing the file
/etc/rc.conf.local
pf=NO
Configuring pf
Enable / disable pf
pfctl -e / pfctl -d
To make changes to the rules you need to edit the file /etc/pf.conf , and for these changes to take effect they have to be loaded from this file with the command
pfctl -f /etc/pf.conf
Configuring pf for access from a computer in St Petersburg (PC_SPb) over rdp through a remote server in Moscow (SRV_MSK) on openbsd to a remote computer in Moscow (PC_MSK) under Windows
ext_if="interface_name_on_SRV_MSK"
pass in on $ext_if proto tcp from PC_SPb_external_ip
to $ext_if port 3389 rdr-to PC_MSK_local_ip
A good guide on opennet, but outdated
Errors
I opened via nano /etc/pf.conf - left it open, after some time a text highlighted in blue appeared in the centre of the screen
panic: pool_do_get(mcl19k): free list modified: page 0xffff800000456000; item addr 0xffff800000456070; offset 0x0=0xffffbeef Stopped at Debugger+0x5: leave RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC! IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS, TOO. DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION! ddb{0}>
I studied the file /var/run/dmesg.boot , found the line
pciide0 at pci3 dev 0 function 0 "Marvell 88SE6121 SATA" rev 0xb1: DMA (unsupported), channel 0
It turns out that one of the network cards is not supported by OpenBSD.
Article author: Andrei Olegovich