Internet of Things (IoT) and sensor networks are improving the cooperation between organizations, becoming more efficient and productive for the industrial systems. However, high iteration between human, machines, and heterogeneous IoT technologies increases the security threats. The IoT security is an essential requirement to fully adoption of applications, which requires correct management of information and confidentiality. The system and devices’ variability requires dynamically adaptive systems to provide services depending on the context of the environment. In this paper, we propose a model driven adaptive approach to offer security services for an ontology-based security framework. Model-Driven Engineering (MDE) approach allows creating secure capabilities more efficient with the generation of security services based on security requirements in the knowledge base (IoTSec ontology). An industrial scenario of C2NET project was analyzed to identify the transformation of a system design of security solution in a platform specific model.