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

    Cron package problems

    Scheduled Pinned Locked Moved pfSense Packages
    9 Posts 4 Posters 3.1k 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.
    • W
      wolf18473
      last edited by

      I am running ver 2.0.2 nano-bsd on alix hardware. I installed the cron package from the web GUI. I added a cron job to run rc.filter_configure_sync. I checked that my cron job appeared in both /etc/crontab and /conf/config.xml and it did.   The cron job ran as scheduled but then deleted it's self from the web GUI list of cron jobs. I then rechecked the contents of /etc/crontab and /conf/config.xml and my cron job had vanished!

      I am very confused as to where the default cron jobs are loaded from after reboot or filter resync. Somehow config.xml is getting overwritten with the default cron jobs????

      Baffeled- Chris

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        the cron jobs are held only in config.xml, and then written to the file in /etc or /var/etc from there.

        If it was in config.xml it wouldn't have just vanished without being deleted deliberately, unless something corrupted the config and caused the OS to restore an old version.

        Check the system log and Diag > Backup/Restore on the Config History tab.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • K
          KeltecRFB
          last edited by

          Is there a chance you forgot to save?

          I entered a cron job for RKhunter to run and it is still working.

          1 Reply Last reply Reply Quote 0
          • W
            wolf18473
            last edited by

            I checked diag=> backup/restore as suggested and this is what was there

            1/23/13 09:47:06 (system): made unknown change
            1/23/13 09:19:25 wolf: /packages/cron/cron_edit.php made unknown change

            the entry for 09:47 is when the cron job ran and deleted it's self. I tried restoring from the most recent backup which put back the cron job. When the cron job ran it was again deleted with (system): made unknown change

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              What exactly is the cron job doing?

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • W
                wolf18473
                last edited by

                The cron job runs /usr/bin/nice -n20 /etc/rc.filter_configure_sync. below is the cron entry from config.xml. I tried deleting all the backups that don't contain the cron job. the cron job still disappears

                • <minute>47</minute>
                • <hour>12</hour>
                • <mday>*</mday>
                • <month>*</month>
                • <wday>*</wday>
                • <who>root</who>
                  -<command></command>
                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  So why are you running /etc/rc.filter_configure_sync manually?

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • W
                    wolf18473
                    last edited by

                    I have a few remote hosts with dynamic ip addresses and dynamic dns. They are in the firewall configuration as aliases with host names rather than ip addresses. when rc.filter_configure_sync runs it does a dns lookup and puts the correct ip addresses in the filter tables. If any of the dynamic ip addresses changes i want the filter tables to get updated with the new ip.

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

                      There should already be a filterdns process running. It wakes up every 5 minutes, checks the IP address of the names in aliases, and updates the pf/ipfw tables. I can see it on both a 2.0.2 and 2.1-BETA1 system:

                      $ ps ax | grep filterdns
                      10168  ??  S      0:00.01 sh -c ps ax | grep filterdns
                      10550  ??  R      0:00.00 grep filterdns
                      50475  ??  INs    0:00.01 /usr/local/sbin/filterdns -p /tmp/filterdns.pid -i 30
                      

                      If I understand correctly, what you need should already be happening.
                      Use Diagnostics->Tables to see the current IPs that are in each table to confirm that it is working.

                      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.