Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Syncookies not working in 2.0.1-RELEASE

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 3 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mkhan
      last edited by

      Hi,

      I'm new to FreeBSD and pfSense and am having problems getting syncookies working on pfSense 2.0.1-RELEASE. The pfSense firewall has two interfaces WAN and LAN. I have a webserver on the LAN that I can get to using NAT. I have net.inet.tcp.syncookies=1 set (I've also tried net.inet.tcp.syncookies_only=1 as well).

      I'm using a Linux box to generate a syn flood using hping3 to the web server IP address on the WAN. I notice that pfSense is passing the traffic to the LAN and the state table is getting filled with SYNs, which shouldn't happen if syncookies are being used.

      I'm wondering if someone has an idea as to why this may not be working? Thanks!

      1 Reply Last reply Reply Quote 0
      • D Offline
        dhatz
        last edited by

        Take a look at the synproxy feature:

        http://www.openbsd.org/faq/pf/filter.html#synproxy

        1 Reply Last reply Reply Quote 0
        • M Offline
          mkhan
          last edited by

          I've tried SYNProxy as well but that doesn't really help. I have 1,000,000 max states configured however, under a syn attack using hping3 all 1,000,000 get filled pretty much instantly. That's the whole reason to have syn-cookies working so that your state table doesn't get full with bogus syn requests. Even if I set net.inet.tcp.msl=7500, the incoming rate of connections outpaces the rate at which they are being removed from the state table. I'm not sending ridiculous amounts of packets either. My simulated attack is about 20-30K pps.

          1 Reply Last reply Reply Quote 0
          • C Offline
            cmb
            last edited by

            SYN cookies has nothing to do with the state table, that only applies to traffic terminating on the firewall itself. You need other controls to prevent state table exhaustion (same as with any firewall), like the various advanced options on rules - limiting states per host, per rule, whatever methodology makes sense in your specific environment.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.