I'm using a FreeBSD serve with PF as my gateway for some time now. Everything seemd to work fine, except that I notice Evolution trying to reach a mailserver on the internet for minutes, until it times out. When I cancel that, it usually works fine right away. But every now and than something goes wrong and it doesn't. I have no idea what causes this problem.
Another strange thing is when I try to post to a forum. This one, for example. When I click on Submit, or Preview, I get a 22 invalid argument error. But when I click on refesh, it works fine.
Here is my firewall configuration. Does some have an idea what causes this strange behavious?
Feel free to point out any rookie mistake too
Another strange thing is when I try to post to a forum. This one, for example. When I click on Submit, or Preview, I get a 22 invalid argument error. But when I click on refesh, it works fine.
Here is my firewall configuration. Does some have an idea what causes this strange behavious?
Code:
int_if = "em0"
ext_if = "fxp0"
tcp_services = "{ 22,80,443,25,587,993 }"
icmp_types = "echoreq"
priv_nets = "{ 192.168.10.0/24 }"
set block-policy drop
set loginterface $ext_if
set skip on lo0
scrub in all
nat on $ext_if from $int_if:network to any -> ($ext_if)
### filter rules
block all
# block incoming traffic from private networks on external interface
block drop in quick on $ext_if from $priv_nets to any
# block outgoing traffic to private networks on external interface
block drop out quick on $ext_if from any to $priv_nets
# allow access to tcp_services on external interface
pass in on $ext_if inet proto tcp from any to ($ext_if) port $tcp_services flags S/SA keep state
# allow in ping replies
pass in inet proto icmp all icmp-type $icmp_types keep state
# allow all traffic from internal network to internal interface
pass in on $int_if from $int_if:network to any keep state
pass out on $int_if from any to $int_if:network keep state
# allow all traffic out via external interface
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state
Feel free to point out any rookie mistake too
