Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Rules for Friendlies and Unfriendlies

    Scheduled Pinned Locked Moved Firewalling
    2 Posts 2 Posters 575 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.
    • L Offline
      lurch66
      last edited by

      Hi Folks,

      The following rule (grabbed right from the PF documentation) works really well on a test machine with a public facing IP address:

      table <bruteforce> persist
      block quick from <bruteforce>
      
      pass inet proto tcp from any to any port ssh flags S/SA keep state (max-src-conn 15, max-src-conn-rate 15/5, overload <bruteforce> flush global)</bruteforce></bruteforce></bruteforce>
      

      I'd love to have another table with an IP range (which are also public IPs) that gets much less strict treatment, I.e.

      table <goodguys> { 1.2.0.0/16, 3.4.0.0/16 }</goodguys>
      

      Of course I'm a PF newbie and don't know the best way to incorporate this, so any suggestions/tips would be most appreciated!

      Cheers, Dan

      1 Reply Last reply Reply Quote 0
      • P Offline
        phil.davis
        last edited by

        Firstly, I hope you are using pfSense and defining the rules using the webGUI.
        Firewall->Aliases
        Add an Alias goodguys, type Networks, put in the networks you want.
        Firewall->Rules
        Add rule/s to pass traffic from those places, with whatever other advanced rule parameters you like.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
        Privacy Policy · Cookie Policy