_                    _
  ___ | |__   __ _ _______ | |_
 / _ \| '_ \ / _` |_  / _ \| __|
| (_) | | | | (_| |/ / (_) | |_
 \___/|_| |_|\__,_/___\___/ \__|

pfconfiguration

Forwarding needs to be allowed in the system:

sysctl net.inet.ip.forwarding=1

pass in quick proto tcp from any to egress port [PUBLIC_PORT] rdr-to [WEB_SERVER] port [INTERNAL_PORT]
pass out on egress proto tcp to [WEB_SERVER] port [INTERNAL_PORT] received-on egress nat-to egress

back to top

- OpenBSD manpages: pfctl(8) , pf.conf(5)

back to top

ohazot | about | ohazot.com <admin@ohazot.com>

OpenBSD 7.7| Created:2025-10-03|Updated:2025-10-06|