Networked manufacturing systems based on traditional Industrial Control Systems (ICS) are particularly exposed to cyberattacks. Mostly based on Programmable Logic Controllers (PLCs), they have been designed to isolate manufacturing environments without connection to cyber-infrastructures such as cloud, connectivity with offices, and other manufacturing sites. Hence, low cybersecurity protection levels make such ICS interesting for malicious cyber-attackers. Thus, resilience to such attacks through cybersecurity has become one of the most significant concerns of Industry 4.0. While the technical aspects of cybersecurity for manufacturing systems are increasingly researched, there are few published works on effective methods to train cybersecurity for manufacturing systems. This paper proposes a cybersecurity training concept that builds on teaching cybersecurity in an interactive role-based approach within a teaching factory environment. Both attack and defense strategies can be explored, and student learning performance evaluated. The concept has been implemented to show its feasibility and potential to outperform traditional classroom-based training methods.