Question
How can I configure pfSense to defend against SYN flood attacks?
Asked by: USER5699
64 Viewed
64 Answers
Answer (64)
To defend against SYN flood attacks in pfSense, you can:
1. **Adjust System Tunables:** Navigate to System > Advanced > System Tunables and search for settings like `net.inet.tcp.syncache.hashsize`, `net.inet.tcp.syncache.bucketlimit`, and `net.inet.tcp.syncookies`. Enabling `net.inet.tcp.syncookies` is crucial as it allows the firewall to respond to SYN requests without allocating resources until the client responds to the cookie.
2. **Firewall Rules with Synproxy State:** Create floating rules with 'State Type: Synproxy State' on the WAN interface for common service ports (e.g., 80, 443). Synproxy State acts as a proxy, completing the TCP handshake with the client before forwarding the connection to the internal server, protecting the server from direct SYN floods.
3. **State Limits:** Set `Firewall > States > State Table Size` and `Firewall > Settings > Maximum state entries` to appropriate values.