THE WRITER MUST EAT -> patreon.com/trn1ty <-

| \    |   | blah!
|\ | `\|\  | the rantings and ravings
|/ |(_|| | * of a depraved lunatic

<^>

2024-06-26

Still sick but not as sick as yesterday.

Host (Raspbian)
# brctl addbr br0
# brctl addif br0 eth0
# ip link set up dev br0
# ip addr add dev br0 10.0.0.101/24

<https://pub.gctl.io/posts/2019-12-07-vlan-on-openbsd/>

Guest (OpenBSD)
# ifconfig
$ ifconfig
lo0: flags=2008049<UP,LOOPBACK,RUNNING,MULTICAST,LRO&rt; mtu 32768
        index 3 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8802<BROADCAST,SIMPLEX,MULTICAST&rt; mtu 1500
        lladdr 52:54:00:a7:bf:8e
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: no carrier
enc0: flags=0<&rt;
        index 2 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141<UP,RUNNING,PROMISC&rt; mtu 33136
        index 4 priority 0 llprio 3
        groups: pflog
# echo up | tee /etc/hostname.vio0
up
# sh /etc/netstart
WARNING: /etc/hostname.vio0 is insecure, fixing permissions.
# ifconfig
lo0: flags=2008049 mtu 32768
        index 3 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8843 mtu 1500
        lladdr 52:54:00:a7:bf:8e
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
enc0: flags=0<>
        index 2 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141 mtu 33136
        index 4 priority 0 llprio 3
        groups: pflog
# echo inet 10.0.0.105 255.255.255.0 NONE | tee -a /etc/hostname.vio0
inet 10.0.0.105 255.255.255.0 NONE
# sh /etc/netstart
# ifconfig
lo0: flags=2008049 mtu 32768
        index 3 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8843 mtu 1500
        lladdr 52:54:00:a7:bf:8e
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
        inet 10.0.0.105 netmask 0xffffff00 broadcast 10.0.0.255
enc0: flags=0<>
        index 2 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141 mtu 33136
        index 4 priority 0 llprio 3
        groups: pflog

Host
$ ssh 10.0.0.105
The authenticity of host '10.0.0.105 (10.0.0.105)' can't be established.
ECDSA key fingerprint is SHA256:/[...]/[...].
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.0.0.105' (ECDSA) to the list of known hosts.
Last login: Wed Jun 26 07:45:42 2024
OpenBSD 7.5 (GENERIC) #131: Wed Mar 20 19:09:19 MDT 2024

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

## HOLY FUCKING SHIT. I JUST NEEDED TO USE A STATIC IPv4.

$ git pull --all 
ssh: Could not resolve hostname git.tebibyte.media: no address associated with
name
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

## oh fucking hell. now that the bridge is established I can't get to the wlan.
## i'm just giving the VM another interface. also, i'm using virt-manager now

Guest
# echo up | tee /etc/hostname.vio1
up
# sh /etc/netstart
WARNING: /etc/hostname.vio1 is insecure, fixing permissions.
# ifconfig
lo0: flags=2008049 mtu 32768
        index 4 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8843 mtu 1500
        lladdr 52:54:00:a7:bf:8e
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
        inet 10.0.0.105 netmask 0xffffff00 broadcast 10.0.0.255
vio1: flags=8843 mtu 1500
        lladdr 52:54:00:ea:4d:90
        index 2 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
enc0: flags=0<>
        index 3 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141 mtu 33136
        index 5 priority 0 llprio 3
        groups: pflog

## I'm not getting an IP via DHCP on vio1 so I must have configured it wrong.
## I made a new Routed network and changed vio1 to use that in virt-manager.
## That didn't work.
## Same settings except NAT explicitly forwarded to wlan0.
## Updated the vio1 NIC to use that.

Guest
# ifconfig
lo0: flags=2008049 mtu 32768
        index 4 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8843 mtu 1500
        lladdr 52:54:00:a7:bf:8e
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
        inet 10.0.0.105 netmask 0xffffff00 broadcast 10.0.0.255
vio1: flags=8843 mtu 1500
        lladdr 52:54:00:ea:4d:90
        index 2 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
enc0: flags=0<>
        index 3 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141 mtu 33136
        index 5 priority 0 llprio 3
        groups: pflog
# ifconfig vio1 inet autoconf
# ifconfig
lo0: flags=2008049 mtu 32768
        index 4 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8843 mtu 1500
        lladdr 52:54:00:a7:bf:8e
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: active
        inet 10.0.0.105 netmask 0xffffff00 broadcast 10.0.0.255
vio1: flags=808843 mtu 1500
        lladdr 52:54:00:ea:4d:90
        index 2 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect
        status: active
        inet 192.168.100.145 netmask 0xffffff00 broadcast 192.168.100.255
enc0: flags=0<>
        index 3 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141 mtu 33136
        index 5 priority 0 llprio 3
        groups: pflog

## Huh.

# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=54 time=38.432 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=24.622 ms
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 24.622/31.527/38.432/6.905 ms

Host
$ ssh 10.0.0.105
Last login: Wed Jun 26 08:43:23 2024
OpenBSD 7.5 (GENERIC) #131: Wed Mar 20 19:09:19 MDT 2024

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

It works. IT WORKS!

Now just to

$ echo inet autoconf | doas tee -a /etc/hostname.vio1
inet autoconf

[11 hours later]

<https://wiki.debian.org/BridgeNetworkConnections
#Configuring_bridging_in_.2Fetc.2Fnetwork.2Finterfaces&rt;

[4 hours later]

Okay, br0 was unnecessary. For real.

# ip link set br0 down
# brctl delif br0 eth0
# brctl delbr br0
# virsh net-start --network default

<^>

No rights reserved, all rights exercised, rights turned to lefts, left in this
corner of the web.