The global society in which we are immersed is facing the challenges set out in 2030 Agenda: Sustainable Development Goals (SDGs). This study focuses on whether mathematics teachers teach SDGs alongside with their subject in schools located in rural areas of Castilla and León (Spain). Specifically, this research aims to find out how teachers of mathematics with generalist training who teach in Primary Education (6-12) and teachers with more specific training who teach in Secondary Education and Baccalaureate (12-18) work with these aspects. The methodology used was quantitative, as an online questionnaire was used to collect the 150 responses that make up the sample for this study. The results show that teachers of mathematics at both educational levels should pay greater attention to the content linked to the SDGs within their subject.