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

    Block browsing at night

    General pfSense Questions
    4
    5
    1.5k
    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.
    • S
      snoopy100
      last edited by

      Hi all,

      I'd like to block browsing at night, from say 8:00 PM to 6:00 AM.  Can someone point me to a thread?

      Currently I'm using IPCOP and blocking using squid.  I have a cron job which copies a squid configuration file in place then restarts squid.

      I was hoping for something neater.

      Thanks,

      Julien

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

        Two tasks to comply  ;)
        1. Goto Firewall:Schedules
        1.1 Create ones as you need
        2. Goto Firewall:Rules
        2.1 Apply schedule on rules what you want(search below 'normal' view)

        Hint: I'd use block all on top of the list and schedule it to go online during that night time, then you don't have to modify every single rule on the list

        1 Reply Last reply Reply Quote 0
        • S
          snoopy100
          last edited by

          Excellent, thanks a lot.

          I did just as you advised, blocked port 80 and port 443, added a schedule.  
          When I look at the firewall rules the 80 and 443 are in the destination port column.

          Is that correct?

          Julien

          And I guess I need to add my firewall rules to the LAN, not the WAN list?  That seems to work.

          1 Reply Last reply Reply Quote 0
          • D
            dreamslacker
            last edited by

            @snoopy100:

            Excellent, thanks a lot.

            I did just as you advised, blocked port 80 and port 443, added a schedule.  
            When I look at the firewall rules the 80 and 443 are in the destination port column.

            Is that correct?

            Julien

            And I guess I need to add my firewall rules to the LAN, not the WAN list?  That seems to work.

            Regular HTTP/ HTTPS servers are hosted with port 80/ 443 respectively.  If you are blocking outbound requests (Lan to internet) then you need to place the rules in LAN with destination ports 80 & 443.

            If you want to block inbound traffic, then you would place the rule in WAN tab with source IP any, source port 80/ 443 and destination ip LAN subnet with any port.

            Generally speaking, blocking the outbound from LAN would make more sense.  Take note that this only affects servers that host on the regular ports.  Websites hosted on alternative ports are not affected.  You will need to use Squid if that is an issue.  There should be scheduled ACLs for Squid.

            1 Reply Last reply Reply Quote 0
            • S
              sgtr
              last edited by

              @Metu69salemi:

              Two tasks to comply  ;)
              1. Goto Firewall:Schedules
              1.1 Create ones as you need
              2. Goto Firewall:Rules
              2.1 Apply schedule on rules what you want(search below 'normal' view)

              Hint: I'd use block all on top of the list and schedule it to go online during that night time, then you don't have to modify every single rule on the list

              Thank you Metu69salemi. I used your suggestion and achieved.

              Regards,
              SGTR

              Bir umut olmasa bile Asla Pes Etme.

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