A method for producing a glass-like protective layer on a metal substrate or glass substrate or a pre-coated metal substrate or glass substrate, said method comprising the steps of a) mixing one or more silicon compounds of formula R n SiX 4-n where R is independently alkyl, aryl, alkaryl or arylalkyl, X is independently alkoxy or acyloxy, and n is 0, 1 or 2, with the proviso that at least one silicon compound of formula is used, where n is 1 or 2, with NaOH and KOH, b) adding water to the mixture obtained in step a) to hydrolyse the silicon compound(s) of formula, c) adding at least one compound of formula MY m where M is Pb, Ti, Zr, Al or B, preferably Ti, Y is independently alkoxy, and m corresponds to the valence of M, wherein one or more alkoxy groups may be replaced by one or more chelating agents and/or two alkoxy groups may be replaced by an oxo group, to the hydrolysed mixture obtained in step b), wherein the molar ratio M/Si is in the range of 0.01/1 to 0.04/1, wherein M is the molar amount of M in the at least one compound of formula and Si is the molar amount of Si in the at least one silicon compound of formula, to obtain a coating sol, d) applying the coating sol obtained in step c) to the metal substrate or glass substrate or the pre-coated metal substrate or glass substrate, and e) thermally compressing the coating sol applied in step d) at a temperature in the range of 300°C to 500°C to form the glass-like protective layer. a) mixing one or more silicon compounds of formula R n SiX 4-n where R is independently alkyl, aryl, alkaryl or arylalkyl, X is independently alkoxy or acyloxy, and n is 0, 1 or 2, with the proviso that at least one silicon compound of formula is used, where n is 1 or 2, with NaOH and KOH, where R is independently alkyl, aryl, alkaryl or arylalkyl, X is independently alkoxy or acyloxy, and n is 0, 1 or 2, with the proviso that at least one silicon compound of formula is used, where n is 1 or 2, with NaOH and KOH, b) adding water to the mixture obtained in step a) to hydrolyse the silicon compound(s) of formula, c) adding at least one compound of formula MY m where M is Pb, Ti, Zr, Al or B, preferably Ti, Y is independently alkoxy, and m corresponds to the valence of M, wherein one or more alkoxy groups may be replaced by one or more chelating agents and/or two alkoxy groups may be replaced by an oxo group, to the hydrolysed mixture obtained in step b), wherein the molar ratio M/Si is in the range of 0.01/1 to 0.04/1, wherein M is the molar amount of M in the at least one compound of formula and Si is the molar amount of Si in the at least one silicon compound of formula, to obtain a coating sol, where M is Pb, Ti, Zr, Al or B, preferably Ti, Y is independently alkoxy, and m corresponds to the valence of M, wherein one or more alkoxy groups may be replaced by one or more chelating agents and/or two alkoxy groups may be replaced by an oxo group, to the hydrolysed mixture obtained in step b), wherein the molar ratio M/Si is in the range of 0.01/1 to 0.04/1, wherein M is the molar amount of M in the at least one compound of formula and Si is the molar amount of Si in the at least one silicon compound of formula, to obtain a coating sol, d) applying the coating sol obtained in step c) to the metal substrate or glass substrate or the pre-coated metal substrate or glass substrate, and e) thermally compressing the coating sol applied in step d) at a temperature in the range of 300°C to 500°C to form the glass-like protective layer.