Hello folks,
I just recently started using PF so bear with me.
What I want my firewall to do is to block all incoming traffic except SSH and HTTP. Furthermore, I'd like to blacklist the IPs that try to bruteforce SSH.
After a few hours of reading this is what I can up with:
However, according to a few different port scanners port 25 as well as 3306 are still open.
What am I missing?
I'd appreciate any other feedback too. This is the first time I am working with PF.
This firewall is running on a public web server.
I just recently started using PF so bear with me.
What I want my firewall to do is to block all incoming traffic except SSH and HTTP. Furthermore, I'd like to blacklist the IPs that try to bruteforce SSH.
After a few hours of reading this is what I can up with:
Code:
if="em0"
lo="lo0"
# Ignore loopback interface
set skip on $lo
# Scrub
scrub in all
# Deal with bruteforcers
table <bruteforce> persist
block quick from <bruteforce>
# Block all in, pass all out
block in log all
pass out all keep state
# Exceptions
pass in on $if proto tcp fron any to any port ssh flags S/SA keep state (max-src-conn 1, max-src-conn-rate 5/3600, overload <bruteforce> flush global)
pass in on $if proto tcp from any to any port http
What am I missing?
I'd appreciate any other feedback too. This is the first time I am working with PF.
This firewall is running on a public web server.