mat~wiki

My personal wiki

openbsd


/index

/programming

OpenBSD is a small project aiming to be a very secure BSD operating system. It is also my faovurite operating system, especially on server-side. It's my server-side operating system of choice. It has a lot of stuff included and pretty much everything works out of the box in there. This page will aim to gather useful notes for OpenBSD system administration.

OpenBSD Official Website

relayd

relayd is probably one of my favourite utilities included in OpenBSD. It has been really useful for me to proxy network traffic that is not HTTP (I prefer using NGINX for that) such as FTP or SSH traffic.

Cheatsheet for myself

# I usually proxy one server so one macro is enough...
upstream_serv="upstream.ip"
# External target ip
ext_ip="server.ip"

# Simple gateway
relay gw {
    listen on $ext_ip port ...PORT...
    forward to $upstream_serv port ...PORT...
}

It's useful for me to note these kind of simple stuff because I tend to forget about it despite it being dead simple :^)