Thanks for your question. At the federal level, S44(iv) of the Australian Constitution prevents anyone who ‘holds any office of profit under the Crown’ from being chosen as a member of the House of Representatives or senator. This means public servants who are employed by the Australian Government must take leave without pay in order to run, and resign if they are elected. If they are not elected, they may return to work. For more information on eligibility to run in federal elections, see the Australian Electoral Commission advice to candidates.
The rules about who is and is not eligible to run in state, territory, and local elections are decided by the state and territory parliaments. You can find these rules on your state Electoral Commission website.