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

{Complete} Timebased Rules

Completed Bounties
10
187
141.6k
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.
  • B
    BuddhaChu
    last edited by Mar 28, 2007, 12:33 AM Mar 28, 2007, 12:26 AM

    Ok, you asked for it!  /me pulls out sledgehammer

    Issue #1 (text only)
    Time minute input error dialog doesn't match the text below the time text boxes in the Time section (Dialog mentions "59" is allowed, webpage text doesn't)

    Fix: Synchronize text between both places to what is actually correct.

    Issue #2 (text only)
    Error text (in red at top of page) returned when a Schedule Name has a space in it states:

    "The schedule name may only consist of the characters a-z, A-Z, 0-9, -, _"

    The text below the text input box states:  "The name of the alias may only consist of the characters a-z, A-Z and 0-9"

    Fix: Synchronize text between both place to what is actually correct.  Adding a name with a dash or underscore triggers the error text so I assume those aren't allowed and what is under the text input box is actually the most correct.

    Issue #3: Receive errors in log when after associating time schedule to a rule then applying that change.  Errors confirmed after trying to add a new time schedule to a rule.

    php: : There were error(s) loading the rules: /tmp/qwanRoot.rules:10: syntax error pfctl: Syntax error in config file: pf rules not loaded pfctl: load anchors - The line in question reads [10]: set loginterface xl2
    
    php: : New alert found: There were error(s) loading the rules: /tmp/qwanRoot.rules:10: syntax error pfctl: Syntax error in config file: pf rules not loaded pfctl: load anchors The line in question reads [10]: set loginterface xl2
    

    Suggestion: Please add a "no spaces" hint to the "Schedule name" section.  Even though a space isn't in the range "a-z, A-Z and 0-9", I'm a little more dense that most techies, so I need some help.

    Workflow/Webpage ergonomics: I keep trying to add my info then hit the Save button at the bottom.  After puzzling about that I noticed the "Add Time" button to add different time slices to the schedule.  My suggestion would be to consider adding a little more text to the error text "The schedule must have at least one time range configured"…possibly "did you Add your time range to the schedule with the "Add Time" button" or something to that effect.  Too wordy, I know...but I hope you can see what I'm suggesting..a small hint.

    Longtime ClarkConnect alpha/beta tester, now pfSense newbie (6 weeks and counting)  :D

    1 Reply Last reply Reply Quote 0
    • B
      BuddhaChu
      last edited by Mar 28, 2007, 12:42 AM Mar 28, 2007, 12:40 AM

      Since I can't get the rules to load with a schedule associated with it, I can't test this so I'll ask it here…

      If a client on the LAN is using Squid in either normal or transparent mode, will they be able to surf the internet even if I have a rule in place to block them?  (This was an issue in ClarkConnect at one time when using the Squid proxy bypassed firewall block rules)

      Now that I re-read this, it isn't really a time-based rule question.  But, I'll leave it anyways and you can call me "stupid".  :\

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by Mar 28, 2007, 12:41 AM

        #3 fixed now.  Thanks!

        #1 and #2 are being fixed as I type this.

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by Mar 28, 2007, 12:42 AM

          @BuddhaChu:

          Since I can't get the rules to load with a schedule associated with it, I can't test this so I'll ask it here…

          If a client on the LAN is using Squid in either normal or transparent mode, will they be able to surf the internet even if I have a rule in place to block them?  (This was an issue in ClarkConnect at one time when using the Squid proxy bypassed firewall block rules)

          Good question.  You'll have to test and let us know :)

          1 Reply Last reply Reply Quote 0
          • B
            BuddhaChu
            last edited by Mar 28, 2007, 12:55 AM

            Suggestion: If the rules are limited to only 5 minute ranges allowed (00, 15, 30, 45, & 59), wouldn't a drop box be better then a text input box?  This would eliminate input errors.  Same for the hour section.

            I don't know if that fits into the pfSense "style" or not.

            1 Reply Last reply Reply Quote 0
            • S
              sullrich
              last edited by Mar 28, 2007, 1:00 AM

              @BuddhaChu:

              Suggestion: If the rules are limited to only 5 minute ranges allowed (00, 15, 30, 45, & 59), wouldn't a drop box be better then a text input box?  This would eliminate input errors.  Same for the hour section.

              I don't know if that fits into the pfSense "style" or not.

              Yes, very good idea.  We'll look into it.

              1 Reply Last reply Reply Quote 0
              • B
                BuddhaChu
                last edited by Mar 28, 2007, 2:38 AM

                After looking at the code in firewall_schedule_edit.php there looks to be a typo on line 581 ("td.innerHTML=" twice @ beginning of the line)

                td.innerHTML=td.innerHTML="

                1 Reply Last reply Reply Quote 0
                • B
                  BuddhaChu
                  last edited by Mar 28, 2007, 3:30 AM

                  I'm full of suggestions tonight…

                  If you get rid of both the hour and minute text boxes and replaced them with one drop down box you could eliminate both the checkKeyEntry() and checkTimeLimits() Javascript functions.  Yes, the drop box would have 97 entries, but I think it would be worth it.

                  The way that's done in ClarkConnect is to build the < option value ="00:15" >00:15< /option > entries with two loops.

                  Pseudo code (I haven't coded in PHP since early 2003)

                  Hour loop - loop from 0 to 23
                    Minute loop - loop from 0 to 45
                        If hour= 0 then
                            Add a zero to the hour in the < option > entry (i.e. "00") $hour . "0:" . $minute
                        Elseif minute = 0
                            Add a zero to the minute in the < option > entry (i.e. "00") $hour . ":0" . $minute
                          Else
                            Output hour:minute to < option > entry
                        End if
                    Return minute loop
                  Return hour loop
                  Add < option > for 23:59

                  I hope I'm helping, not hindering when making these suggestions.

                  1 Reply Last reply Reply Quote 0
                  • B
                    BuddhaChu
                    last edited by Mar 28, 2007, 3:54 AM Mar 28, 2007, 3:50 AM

                    Reloaded with the 3-27 snapshot (built after issue #3 above was fixed). Something happened and now the Schedule column is missing for the two rules that are added with a checkbox (Block private & bogon networks).

                    pfsense.png
                    pfsense.png_thumb

                    1 Reply Last reply Reply Quote 0
                    • S
                      sullrich
                      last edited by Mar 28, 2007, 3:58 AM

                      @BuddhaChu:

                      Reloaded with the 3-27 snapshot (built after issue #3 above was fixed). Something happened and now the Schedule column is missing for the two rules that are added with a checkbox (Block private & bogon networks).

                      That should be fixed.  Please try most recent snapshot.

                      1 Reply Last reply Reply Quote 0
                      • B
                        BuddhaChu
                        last edited by Mar 28, 2007, 4:45 AM

                        Reloaded with the 3-27 snap with a timestamp of 2007-Mar-27 23:23:10 and the issue is still there.

                        The whole < td >< /td > section is missing for the Schedule column.  See attached pic for the HTML code relating to that page.

                        pfsense2.png_thumb
                        pfsense2.png

                        1 Reply Last reply Reply Quote 0
                        • S
                          sullrich
                          last edited by Mar 28, 2007, 4:57 AM

                          Not sure if the snapshot server is broken, but the latest sources show me:

                          schedule.png_thumb
                          schedule.png

                          1 Reply Last reply Reply Quote 0
                          • Y
                            yoda715
                            last edited by Mar 28, 2007, 6:08 AM

                            @BuddhaChu:

                            Reloaded with the 3-27 snapshot (built after issue #3 above was fixed). Something happened and now the Schedule column is missing for the two rules that are added with a checkbox (Block private & bogon networks).

                            I've duplicated this. Will fix shortly.

                            1 Reply Last reply Reply Quote 0
                            • H
                              heiko
                              last edited by Mar 28, 2007, 6:56 AM

                              Good Morning,
                              i will test it in a few hours. Thanks
                              Greetings from Germany
                              heiko

                              1 Reply Last reply Reply Quote 0
                              • Y
                                yoda715
                                last edited by Mar 28, 2007, 7:31 AM

                                @BuddhaChu:

                                Reloaded with the 3-27 snap with a timestamp of 2007-Mar-27 23:23:10 and the issue is still there.

                                The whole < td >< /td > section is missing for the Schedule column.  See attached pic for the HTML code relating to that page.

                                Fixed now.

                                1 Reply Last reply Reply Quote 0
                                • C
                                  Christian
                                  last edited by Mar 28, 2007, 8:59 AM

                                  Hi,

                                  this looks like a really niceaddition, thanks to all involved (the programmers as well as the person paying the bill).

                                  I'm not sure how to test this, but do you have any ideas what will happen if a rule is scheduled for a time that doesn't exist?
                                  I'm refering to daylight saving time.
                                  What happens if something should be disabled at 2:30am every Sunday night, but there is no 2:30 on one Sunday a year?
                                  Also the other way, if a rule is only active between 2am and 2:30am on Sundays, will it be active twice when the extra hour is added?

                                  As I'm not paying for it, so I'm not asking for a special way to handle this, all I would like to know is what is the intendet way  daylight saving will be handled?

                                  Thanks for a cool addition to a cool firewall product,

                                  Christian

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    BuddhaChu
                                    last edited by Mar 28, 2007, 10:15 AM

                                    Confirmed the missing schedule column is fixed.

                                    sdale: Nice fix for not hitting the "Add Time" button on the schedule page.  Even though I'm familiar with the interface now, I forgot to hit the Add Time button and the msgbox dialog helped me out.

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      heiko
                                      last edited by Mar 28, 2007, 12:45 PM

                                      Hello,
                                      very special thanks BuddhaChu for testing it and very very special thanks to "Scott´s" for coding…great

                                      • Issue #1 #2 from BuddhaChu is open

                                      • when i choose multiple days, for example 10 days of month, i think, a line break is missing (Screenshot)

                                      • for me it would be nice, when the date/time picker starts with Monday at the left.... :)

                                      • Problem: a couple days brings "grimbelfixe" to the description, when you edit and save a second time

                                      • Problem: when you stay in the schedule maks and have more than one configured range, and you want to edit one, click this and click a second also without saving the first one, uups, then the logic is a little bit confused the a first range disappeared.

                                      I think, you should only one range to edit at the same time. A second edit is not allowed, before the first one are not saved.

                                      A litte bit more in a 1 or 2 hours, also a posting to the rule features.
                                      Greetings
                                      heiko

                                      line-break.jpg
                                      line-break.jpg_thumb
                                      schedule_multiple_days.jpg
                                      schedule_multiple_days.jpg_thumb
                                      schedule_grimbelfix_edit_second.jpg
                                      schedule_grimbelfix_edit_second.jpg_thumb
                                      ![multiple_configured _ranges.jpg](/public/imported_attachments/1/multiple_configured _ranges.jpg)
                                      ![multiple_configured _ranges.jpg_thumb](/public/imported_attachments/1/multiple_configured _ranges.jpg_thumb)

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        Perry
                                        last edited by Mar 28, 2007, 1:22 PM

                                        In April and July i can't select the dates 1-7, bug?

                                        ![can't select.gif](/public/imported_attachments/1/can't select.gif)
                                        ![can't select.gif_thumb](/public/imported_attachments/1/can't select.gif_thumb)

                                        /Perry
                                        doc.pfsense.org

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          heiko
                                          last edited by Mar 28, 2007, 1:37 PM

                                          I have the same behaviour

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