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

    Block access to PFS from an interface

    Scheduled Pinned Locked Moved Firewalling
    10 Posts 4 Posters 1.5k 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.
    • QinnQ Offline
      Qinn
      last edited by

      Hi there maybe it's a setting and I missed it  :o , but what's the easiest way to block\lockout access to PFS (telnet, ssh, http, https, etc but of course not DHCP) from an certain interface? Or do I have to block/reject them all manually?

      Thanks and cheers Qinn

      Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
      Firmware: Latest-stable-pfSense CE (amd64)
      Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

      1 Reply Last reply Reply Quote 0
      • H Offline
        Harvy66
        last edited by

        Add Allow rule for DHCP port, then add Deny rule for the Destination of the "IP Address"?

        1 Reply Last reply Reply Quote 0
        • DerelictD Offline
          Derelict LAYER 8 Netgate
          last edited by

          Pass what you need (Like DNS - DHCP rules are automatic if there is a DHCP server enabled on the interface)
          Reject IPv4 Protocol any source any dest This firewall (self)

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • QinnQ Offline
            Qinn
            last edited by

            @Derelict:

            Pass what you need (Like DNS - DHCP rules are automatic if there is a DHCP server enabled on the interface)
            Reject IPv4 Protocol any source any dest This firewall (self)

            Thanks I will try that, maybe a suggestion to add this feature for every interface?

            Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
            Firmware: Latest-stable-pfSense CE (amd64)
            Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

            1 Reply Last reply Reply Quote 0
            • johnpozJ Online
              johnpoz LAYER 8 Global Moderator
              last edited by

              feature?  You can create such a rule on any interface you want..  You mean you want that to the be the default?  I use the firewall alias in a block rule on pretty much all my interfaces

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

              1 Reply Last reply Reply Quote 0
              • QinnQ Offline
                Qinn
                last edited by

                @johnpoz:

                feature?  You can create such a rule on any interface you want..  You mean you want that to the be the default?  I use the firewall alias in a block rule on pretty much all my interfaces

                So you do this by using an Alias and then use it as a rule on any interface, sound nice ;) Could you draw that out to me (how to), I am fairly new to using Aliases in pfs.

                Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                Firmware: Latest-stable-pfSense CE (amd64)
                Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                1 Reply Last reply Reply Quote 0
                • johnpozJ Online
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  No I do not create specific alias there is a built in one for the firewall..  It auto includes all IPs of the firewall, wan, lan, opt, vips, etc.

                  https://doc.pfsense.org/index.php/Firewall_Rule_Basics
                  This Firewall (self) - Any IP address assigned to any interface on this firewall (pfSense 2.2+)

                  firewallalias.jpg
                  firewallalias.jpg_thumb

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

                  1 Reply Last reply Reply Quote 0
                  • QinnQ Offline
                    Qinn
                    last edited by

                    @johnpoz:

                    No I do not create specific alias there is a built in one for the firewall..  It auto includes all IPs of the firewall, wan, lan, opt, vips, etc.

                    https://doc.pfsense.org/index.php/Firewall_Rule_Basics
                    This Firewall (self) - Any IP address assigned to any interface on this firewall (pfSense 2.2+)

                    Thanks for pointing that one out, I never knew there was a "This Firewall(self)" under Destination in the Rules and now I understand what @Derelict meant  :o One last question, you do a block why not a reject?

                    Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                    Firmware: Latest-stable-pfSense CE (amd64)
                    Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                    1 Reply Last reply Reply Quote 0
                    • DerelictD Offline
                      Derelict LAYER 8 Netgate
                      last edited by

                      Personal preference. I prefer reject for blocking connections from the inside so the users get immediate feedback.

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                      1 Reply Last reply Reply Quote 0
                      • johnpozJ Online
                        johnpoz LAYER 8 Global Moderator
                        last edited by

                        ^ exactly.. I use reject on some of my other interfaces.  I prob never got around to changing that segment.. There until recently was nothing really on it..

                        I even do a reject on wan side for traceroute from linux boxes..  All depends do you really want the firewall to send back info that port is blocked or can the firewall just drop it?

                        reject.jpg
                        reject.jpg_thumb
                        wanreject.jpg
                        wanreject.jpg_thumb

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

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