<PAGE>   1
                                                                  EXHIBIT 10.22

                              CONSULTING AGREEMENT

         THIS CONSULTING AGREEMENT made and entered into as of March 18, 1997,
by and between CyberGuard Corporation (the "Company"), and David R. Proctor,
an individual residing in Travis County, Texas (the "Consultant");

         WHEREAS, subject to the terms and conditions hereinafter set forth,
the Company wishes to retain the services of the Consultant, and the Consultant
is willing to provide consulting services to the Company.

         NOW, THEREFORE, in consideration of the premises and the mutual
promises and covenants contained herein, and intending to be legally bound
hereby, the parties hereto agree as follows:

1.       Engagement and Term. Subject to the provisions for termination
         hereinafter set forth, the Company hereby engages the Consultant, and
         the Consultant hereby accepts such engagement by the Company, as a
         consultant, on the basis as an independent contractor, for a term
         commencing on the date hereof, continuing through a period of one year
         and renewable on the anniversary date each year thereafter, by the
         mutual agreement of both parties herein or until termination by either
         party as defined by the terms'of "Termination of Agreement" below (the
         "Term").

2.       Duties. During the Term, the Consultant shall perform such services
         and complete such duties as are assigned to him by the Chief Executive
         Officer (CEO) of the Company. Acting in the capacity of Assistant to
         the CEO, Consultant will provide services to CyberGuard's Austin
         Division, TradeWave Corporation, at approximately three quarters of
         time per week for nine months from commencement of this agreement,
         then one half of time per week beyond nine months. Further, Consultant
         will provide services to CyberGuard Corporate at one quarter time per
         week for three months from commencement of agreement, and then as
         available depending on requirements of TradeWave Corporation. The
         Consultant will be available to provide all such services on a near
         full-time basis.

3.       Fees and Expenses. For the due and faithful performance of the
         services contemplated by this Agreement, the Company will pay to the
         Consultant during the Term a fee in the amount of $500.00 per day
         ("the Daily Feel,), payable on a monthly basis. The Company will
         reimburse the Consultant for his reasonable and necessary business
         expenses for travel related to the performance of duties herewith
         which occur outside the Travis County, Texas, area. In support of
         hours worked and expenses to be reimbursed, consultant will submit
         monthly billing/invoice documents. Further, the Consultant will
         receive an immediate and unconditional Stock Option grant of fifteen
         thousand (15,000) shares of CyberGuard Corporation stock, at a date of
         grant exercise price as of the date of the related Option Agreement
         ("First Option"). Vesting of the First Option shall be in 4 equal
         increments of 3750 shares commencing quarterly on July 1, 1997. Up to
         an additional fifteen thousand shares will vest on the one year
         anniversary date of this Agreement, with the same date of grant
         exercise price as the First Option, conditional on agreed-upon
         performance achievement criteria, to be mutually agreed upon by the
         Company and the Consultant (the "Second Option"; the First Option and
         the Second Option are sometimes hereinafter referred to collectively
         as the "Options"). All Options expire in three years or as otherwise
         stated in section 4, below (dealing with Option expiration upon
         termination of this Agreement).

4.       Termination of Agreement. Notwithstanding any other provision of this
         Agreement to the contrary, the Consultant's engagement hereunder and
         fees shall terminate and cease to accrue forthwith upon the first to
         occur of the following (the "Termination Date"):


<PAGE>   2
   a)       if Consultant is offered a position as a full time employee of the
   Company or any successor to the Company (including a successor by acquisition
   of substantially all the Company's assets), then the Termination Date shall
   occur upon the first day of such employment or the first day on which the
   Consultant rejects such offer of employment (a rejection shall be deemed to
   include a failure by Consultant to accept the offer of employment within the
   time period set forth in such offer), in which case, the Consultant shall be
   paid at the rate of the Daily Fee through Termination Date;

   b)       the Termination Date shall occur upon notice of termination being
   given to such Consultant by the Company and

   c)       the Termination Date shall occur immediately if at anytime the
   Consultant resigns, in which event the Consultant shall be paid through the
   date of such resignation at the rate of the Daily Fee.

If the Company should terminate this Agreement prior to April April 1, 1998,
then (i) in the event that Consultant contemporaneously is offered an
employment position with the Company and accepts such position, the Options
shall continue; (ii) in the event that the Consultant does not become an
Employee of the Company, the Option shall terminate except for any vested
options and the prorated portions of any non-vested Options, which vested
Options shall survive the termination of this Agreement for one year.

5.       Integration. This Agreement constitutes and expresses the entire
agreement of the parties with respect to the subject matter hereof and
supersedes and cancels all prior negotiations, discussions, agreements and
understandings relating to such subject matter. This Agreement may not be
modified or amended except by an instrument in writing executed by both parties
hereto.

6.       Independent Contractor. The Consultant shall be and remain only an
independent contractor. Nothing contained herein shall be deemed or construed
to create an employer/employee relationship. The Consultant shall not be
eligible to participate in any benefit plans, programs or arrangements made
available to employees of the Company. 

7.       Notices. All required or permitted notices, requests, demands and
other communications hereunder shall be in writing and shall be deemed
effectively given on the day of delivery if delivered by hand, or on the third
day after mailing if mailed within the continental United States by first class
certified mail, return receipt requested, postage prepaid, addressed as
follows:

                     (a)    if to the Company, to:

                     Robert L. Carberry, CEO 2101 West Cypress Creek Road
                     Fort Lauderdale, Florida 33309-1892

                     or subsequent forwarding addresses.

                     (b)    to the Consultant, to:

                     David R. Proctor 
                     17 Cousteau Lane 
                     Austin, Texas 78746



<PAGE>   3

                         or subsequent forwarding addresses

Such addresses may be changed by written notice sent to the other party at the
last recorded address of that party.

8.       Insider Trading provisions. Based upon the consultant's position as a
Director on the Company's Board, the Consultant agrees to abide by the
provisions of the Company's Insider Trading Policy as it relates to the sale of
the Stock Option grants referenced in 3) above.

9.       Miscellaneous.

a)       The invalidity or unenforceability of any particular provisions of this
Agreement shall not affect the other provisions hereof; and this Agreement
shall be construed in all respects as if such invalid or unenforceable
provisions were omitted.

b)       This Agreement shall be construed in accordance with the laws of the
State of Texas other than the conflict of laws provisions of such laws.


c)       This Agreement shall be binding upon the parties hereto, their heirs,
legal representatives, successors, and assigns and shall not be assignable by
either party, except upon prior written consent by both parties to this
Agreement.

IN WITNESS WHEREOF, the parties hereto have executed this Agreement the day and
year first above written.

                                                 CYBERGUARD CORPORATION

                                                 By:
                                                 Chairman, President & CEO

                                                 Consultant:
                                                 David Proctor

                                       4