Hi, I have a small board that acts as my router/DHCP/Dns Server and Firewall.
I need to pull up a "basic" pf configuration to redirect traffic to my server running a webserver(nginx).
For now I managed to write something but I didn't succeed in my intent:
But doesn't work as expected..
I need to pull up a "basic" pf configuration to redirect traffic to my server running a webserver(nginx).
For now I managed to write something but I didn't succeed in my intent:
Code:
ext_if="re0"
int_if="re1"
webports = "{80,443}"
server = "192.168.1.16".
tcp_services = "{domain, ntp, smtp, www, https, ftp, ssh, http}"
set skip on lo
scrub in
nat on $ext_if inet from ! ($ext_if) to any -> ($ext_if)
rdr pass on $ext_if proto tcp from any to $ext_if port 80 -> $server port 80
block in
pass out keep state
pass in on $ext_if inet proto tcp from any to $ext_if port $tcp_services
pass quick on $int_if no state
But doesn't work as expected..