OpenBSD - Setup Firewall IP Forwarding

Channel:
Subscribers:
1,600
Published on ● Video Link: https://www.youtube.com/watch?v=LLdbLOQdxw8



Duration: 6:39
263 views
11


OpenBSD - Setup IP Forwarding
Turn on the subtitles to have better informations
---------
nano /etc/sysctl.conf
net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1
--exit
nano /etc/pf.conf
set skip on lo
pass in on egress proto tcp from any to any port 80 rdr-to yourip
pass in on egress proto tcp from any to any port 443 rdr-to yourip
pass in on egress proto tcp from any to any port 22 rdr-to yourip
pass in on egress proto udp from any to any port 22 rdr-to yourip
--exit
usermod -G sshd username
doas pfctl -f /etc/pf.conf (to load your custom firewall rules as default)
----------------
With this firewall edit, you have enabled the ports 22 80 and 443, both in ingoing and outgoing, to make OpenBSD works as a webserver, to make it possible to reach it from the outside world.
#al1en99 #openbsd #firewall