Hi Everyone,
I've set up a PF firewall on my FreeBSD server, but I'm a bit confused. I've blocked all the traffic by default and only allowed the traffic I want. When I do a port scan on my server it shows the TCP ports 119, 995, 993, 587, 563, 465 to be open. I didn't explicitly mark those as open. Why are these still open and ports like 21 are closed as I would expect?
Below are the firewall rules I use:
Thanks.
I've set up a PF firewall on my FreeBSD server, but I'm a bit confused. I've blocked all the traffic by default and only allowed the traffic I want. When I do a port scan on my server it shows the TCP ports 119, 995, 993, 587, 563, 465 to be open. I didn't explicitly mark those as open. Why are these still open and ports like 21 are closed as I would expect?
Below are the firewall rules I use:
Code:
## Macros
SYN_ONLY="S/FSRA"
EXT_NIC="re0"
# Internet IP, (comments out for posting purpose)
EXT_IP="###.###.###.###"
## TABLES
## GLOBAL OPTIONS
## TRAFFIC NORMALIZATION
## QUEUEING RULES
## TRANSLATION RULES (NAT)
## FILTER RULES
# Block everything
block all
block return-rst in log on $EXT_NIC proto TCP all
pass in log quick on $EXT_NIC proto TCP from any to any port 22 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 443 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 113 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 110 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 143 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 25 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 80 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 2222 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto TCP from any to any port 53 flags $SYN_ONLY keep state
pass in log quick on $EXT_NIC proto udp from any to any port 53 flags $SYN_ONLY keep state
block out log on $EXT_NIC all
pass out log quick on $EXT_NIC from $EXT_IP to any keep state
# Allow the local interface
pass in quick on lo0 all
pass out quick on lo0 all
Thanks.