► A preservative based on TEOS, APTES and boric acid was applied to wood by a sol–gel process. ► The best ratio APTES: Boron in terms of impregnation and B fixation into the wood resulted to be 5:1. ► Effectiveness against brown rot and white rot decay even after a leaching procedure was shown. ► Effectiveness against the coleopter Hylotrupes bajulus, when applied by immersion, was also shown.