binat-to not passing traffic out

Hello. I have am working on getting a router setup using pf, and I am having some trouble using binat-to. I have two servers that both need to be on port 80, so I am using binat-to to redirect everything from one ip address to one server with a rule like this:

Code:
pass quick on $ext_if from $web_serv to any binat-to $web_ip

Then, for the other server, I am just using port forwarding using this rule:

Code:
pass in on $ext_if proto tcp from any to $ext_if port $web_port \
rdr-to $wiki port $web_port

Traffic can pass out fine for the $wiki, but for the $web_serv using the binat-to rule, I can reach the server from outside, but I cannot reach outside the network from the server (for instance, installing new packages or updating).

I am just learning about this stuff, and I think there is probably a conflict the rules, but I can't figure out how to correctly pass traffic out from the $web_serv using the binat-to rule.

Could anyone point me in the right direction?
 
You can't redirect both servers from port 80 this way. It's simply not going to work.
 
Back
Top