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

    Restrict (internet) access to certain MAC addresses at specific times

    Scheduled Pinned Locked Moved General pfSense Questions
    14 Posts 5 Posters 6.3k 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.
    • P
      Panja
      last edited by

      Thanks for the reply.
      The problem is that this is done by IP and not by MAC address.
      I would like to block on MAC address instead.

      If my daughter is smart enough, and she probably is, she will just change her current IP address and go past the firewall rule I set up.

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        There is no such feature in pf packet filter.

        1 Reply Last reply Reply Quote 0
        • M
          muswellhillbilly
          last edited by

          @Panja:

          Thanks for the reply.
          The problem is that this is done by IP and not by MAC address.
          I would like to block on MAC address instead.

          Why not set your DHCP service on your PFS to issue static-only addresses and bind her PC's MAC to a single address? You may find you can do the same thing on your wifi AP, assuming she's using wifi to connect. You can then apply your firewall rule to her machine via the static IP she receives.

          1 Reply Last reply Reply Quote 0
          • P
            Panja
            last edited by

            @doktornotor
            That's a pity. But thanks for clearing that up.

            @muswellhillbilly
            I can give her a static IP through DHCP (static lease).
            But wouldn't it just be possible to change her IP manually on the phone, ipad etc?
            She can than pick an IP that is not blocked and still access the internet.

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

              Multi-SSID Wi-Fi, separate VLAN, and don't let her have the passphrase to the regular Wi-Fi.

              Re: the android, my kid would just turn off wifi and use cell data. End result, no phone. Does the iPad have cell data?

              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
              • M
                muswellhillbilly
                last edited by

                @Panja:

                I can give her a static IP through DHCP (static lease).
                But wouldn't it just be possible to change her IP manually on the phone, ipad etc?
                She can than pick an IP that is not blocked and still access the internet.

                So create a firewall rule which prevents all but the static addresses you define from getting internet access. Randomise the addresses - give her, say, 172.16.1.23 and something else 172.16.5.34 on a /16 subnet - and she would then have to try changing anything up to 255x255 possible addresses before finding one that might let her out. My bet is she'd lose interest fast and just learn to live with the rules you've set.

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

                  There's always nmap, tcpdump, wireshark, etc, to do that work for her. Separate interface/VLAN is the only way to be sure.

                  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
                  • P
                    Panja
                    last edited by

                    Thanks all for thinking with me to find a solution! Cheers for that.

                    We have 2 wifi access points to cover the house with signal. Both with the same SSID to have wireless "roaming".
                    I would like to use VLAN's but I don't think it's possible with my setup at the moment.

                    pfSsense box –> wireless access point 1 --> unmanaged switch  --> wireless account point 2

                    Could the restrict access be done with FreeRadius? I'm going to setup radius for wifi authentication anyways.

                    1 Reply Last reply Reply Quote 0
                    • P
                      Panja
                      last edited by

                      @Panja:

                      Could the restrict access be done with FreeRadius? I'm going to setup radius for wifi authentication anyways.

                      To answer my own question: not possible…
                      I can restrict logging on to the network, but already connected devices stay connected.
                      So for instance if I set the user logon times to be available from 07.00 - 21.00 hours.
                      When the device is connected between this hours and does not disconnect, than the connection is still available after 21.00 hours.
                      Only when the device gets disconnected and tries to reconnect, than the connection is not available.

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

                        If you want to create a discrete subnet/segment you'll need the gear for it.

                        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
                        • P
                          Panja
                          last edited by

                          I understand that but at the moment I don't have the (extra) gear for it.

                          1 Reply Last reply Reply Quote 0
                          • M
                            mer
                            last edited by

                            @Panja:

                            @Panja:

                            Could the restrict access be done with FreeRadius? I'm going to setup radius for wifi authentication anyways.

                            To answer my own question: not possible…
                            I can restrict logging on to the network, but already connected devices stay connected.
                            So for instance if I set the user logon times to be available from 07.00 - 21.00 hours.
                            When the device is connected between this hours and does not disconnect, than the connection is still available after 21.00 hours.
                            Only when the device gets disconnected and tries to reconnect, than the connection is not available.

                            So setup a cron job to flush the states at 7:05.  It may interrupt a few legimate things, but it whacks the desired connections and then if they try to reconnect, they get hit by the scheduled block.

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