Filter for treating a fluid in a piping of a heating and/or cooling system, in particular for household and/or industrial use, said filter comprising: - a main body comprising at least one internal chamber; - a filtering element for treating the fluid, said filtering element comprising at least one magnetic element housed at least partially in said chamber and adapted to intercept and trap any ferrous impurities contained in the fluid to be treated, wherein said main body comprises a first mouth, a second mouth and a third mouth having the same shape, wherein said first mouth, second mouth and third mouth comprise, respectively, a first duct, a second duct and a third duct that allow the fluid to enter and/or exit the chamber, wherein a first side of the first mouth, a second side of the second mouth and a third side of the third mouth are made in the same manner in terms of dimensions and shape, wherein the first mouth, the second mouth and the third mouth comprise corresponding connection means, in particular said connection means may consist of identical threads on the sides,, of said first mouth, second mouth and third mouth, wherein said main body has a substantially cylindrical shape, the first mouth and the third mouth being positioned on the side surface of the main body, whereas the second mouth is positioned at one end of the substantially cylindrical main body, wherein the first mouth and the third mouth are positioned on the main body on opposite sides relative to the chamber and in such a way as to have first longitudinal axes substantially coinciding with each other, and wherein the second mouth is positioned on the main body in such a way as to have a second longitudinal axis substantially perpendicular to the first longitudinal axes of the first mouth and third mouth. - a main body comprising at least one internal chamber; - a filtering element for treating the fluid, said filtering element comprising at least one magnetic element housed at least partially in said chamber and adapted to intercept and trap any ferrous impurities contained in the fluid to be treated, wherein said main body comprises a first mouth, a second mouth and a third mouth having the same shape, wherein said first mouth, second mouth and third mouth comprise, respectively, a first duct, a second duct and a third duct that allow the fluid to enter and/or exit the chamber, wherein a first side of the first mouth, a second side of the second mouth and a third side of the third mouth are made in the same manner in terms of dimensions and shape, wherein the first mouth, the second mouth and the third mouth comprise corresponding connection means, in particular said connection means may consist of identical threads on the sides,, of said first mouth, second mouth and third mouth, wherein said main body has a substantially cylindrical shape, the first mouth and the third mouth being positioned on the side surface of the main body, whereas the second mouth is positioned at one end of the substantially cylindrical main body, wherein the first mouth and the third mouth are positioned on the main body on opposite sides relative to the chamber and in such a way as to have first longitudinal axes substantially coinciding with each other, and wherein the second mouth is positioned on the main body in such a way as to have a second longitudinal axis substantially perpendicular to the first longitudinal axes of the first mouth and third mouth.