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

    Time volume restriction

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 1.2k 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 Offline
      Perun
      last edited by

      Hi

      I need something like time volume restriction for a day. Something like: this IP (or User) should be able to use internet only 2h a day and only between 08:00 and 21:00.
      It is possible with pfsense? Is there somewere a howto for this?

      Greetz

      1 Reply Last reply Reply Quote 0
      • marcellocM Offline
        marcelloc
        last edited by

        Sure. Create a schedule with this time range and then apply it to a LAN rule associated with this ip address before any rule that allows access. You may need to create a rule below denying access from this ip to be sure that any other rule will allow the ip traffic.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

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

          https://doc.pfsense.org/index.php/Firewall_Rule_Schedules - a short summary of what to do.

          As @marcelloc mentions, be "positive" about giving the IP access during the scheduled hours (a pass rule for the scheduled "allow" hours). And have a general block rule after it, to block them at other times. That way, when the scheduled time ends, pfSense can match any remaining states that are using the rule that has just "timed-out" and can remove the states. This ensures that at the end of the scheduled time, whatever the user is doing will "just stop".

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

            with this solution I can give access in the specific time period but it is not a solution for time VOLUME. Example: only 2h daily access between 08:00 und 21:00.

            or did I not understand it?

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

              I guess a combination of access hours using firewall rules and then captive portal vouchers that can let users "buy" lengths of time within that period. That might be a bit difficult to let them have, e.g., 2 hours during that period and that period only. If they are issued with a bunch of CP vouchers then they could go on a splurge and use them all in 1 day. Or if you give them out daily, the user can save them one day and use them the next. Administratively you would have to give them 2 hours worth of vouchers each day which expire at the end of that day…

              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 2025 Rubicon Communications LLC (Netgate). All rights reserved.