Here are recipes that we have tried and used:
Gallnuts, 5 grams
Ferrous Sulfate, 1 gram
Gum Arabic, 1 gram
Water, 200 grams
Grind the gallnuts to a fine powder and immerse in half of the water. In a few weeks, mold will cover the top surface. Skim off the mold and pour the liquid through a filter. Dissolve gum Arabic in a small amount of water and add it to the liquid. Dissolve the ferrous sulfate in water and add it to the liquid. Add 1 gram of carbolic acid to keep mold from forming.
The second recipe containing shellac is more waterproof:
To 18 ounces water, add 1 ounce powdered borax and 2 ounces bruised shellac, and boil them in a covered vessel, stirring them occasionally till dissolved. Filter, when cold, through coarse filtering paper; add 1 ounce mucilage; boil for a few minutes, adding sufficient finely-powdered indigo and lampblack to color it. Leave the mixture for 2 or 3 hours for the coarser particles to subside; pour it off from the dregs, and bottle it for use.
Dick's Encyclopedia of Practical Receipts and Processes, c. 1870