D
d3crypt
Guest
I recently started using the PF firewall on my server, instead of using no firewall at all (yes, this was stupid). I have noticed that traffic seems to be going much slower than usual. I really doubt that this would be a network problem because It is a VPS on Digital Ocean.
Here is my /etc/pf.conf
Here is my /etc/pf.conf
Code:
###########################
# d3crypt PF Ruleset #
###########################
### macro name for external interface
ext_if="vtnet0"
int_if ="lo0"
### drop blocked packets
set block-policy drop
### all external traffic on external interface is normalized
### and fragmented packets are reassembled
scrub in on $ext_if all fragment reassemble
### default policy to block all
block in all
### exercise antispoofing on the external interface, but add local
### loopback interface as an exception, to prevent services
### utilizing the local loop from being blocked accidentally
set skip on $int_if
antispoof for $ext_if inet
### block anything coming from sources that we have no back routes for
block in from no-route to any
### block packets that fail a reverse path check. we look up the routing
### table, check to make sure that the outbound is the same as the source
### it came in on. if not, it is probably source address spoofed.
block in from urpf-failed to any
### block probes that can possibly determine our operating system by disallowing
### certain combinations that are commonly used by nmap, queso and xprobe2, who
### are attempting to fingerprint the server.
### * F : FIN - Finish; end of session
### * S : SYN - Synchronize; indicates request to start session
### * R : RST - Reset; drop a connection
### * P : PUSH - Push; packet is sent immediately
### * A : ACK - Acknowledgement
### * U : URG - Urgent
### * E : ECE - Explicit Congestion Notification Echo
### * W : CWR - Congestion Window Reduced
block in quick on $ext_if proto tcp flags FUP/WEUAPRSF
block in quick on $ext_if proto tcp flags WEUAPRSF/WEUAPRSF
block in quick on $ext_if proto tcp flags SRAFU/WEUAPRSF
block in quick on $ext_if proto tcp flags /WEUAPRSF
block in quick on $ext_if proto tcp flags SR/SR
block in quick on $ext_if proto tcp flags SF/SF
table <bruteforce> persist file "/var/db/blacklist"
block quick from <bruteforce>
### all incoming ssh
pass in on $ext_if proto tcp to any port ssh flags S/SA keep state \
(max-src-conn 10, max-src-conn-rate 10/5, overload <bruteforce> flush)
pass out quick on $ext_if proto { tcp, udp, icmp } to any