title: How to configure an Apache server/crontab/bash file to allow access at certain times during the day and/or from specific IPs?
body: <p>I am attempting an exercise given by my instructor. We were tasked with setting up a VirtualHost that could be accessed mon-fri/1-5. On top of that, we must allow access to the site from IP "XX.XX.XX.XXX" at anytime.</p>
  
  <p>Current crontab:</p>
  
  <pre><code>* 13 * * 1-5 root apachectl start
  * 17 * * 1-5 root apachectl stop
  * * * * * root ./bash
  </code></pre>
  
  <p>Bash file:</p>
  
  <pre><code>currIP=$(hostname -I)
  case "$currIP" in
          *XX.XX.XX.XXX*)
                ???????
  ;;
  esac
  </code></pre>
  
  <p>Can someone explain to me how I am going to serve this site to the IP without serving it to everyone at once?</p>
  
  <p>Thanks!</p>