Bridging the gap between threat intelligence collection and active infrastructure defence using GreyNoise, Linux and n8n.
From observation to action
Collecting threat intelligence is valuable, but its real potential becomes apparent when that intelligence can be translated into meaningful defensive action.
As part of my personal infrastructure, I operate honeypot sensors that contribute to the GreyNoise ecosystem, observing unsolicited internet activity and helping build a broader understanding of internet-based threats.
These sensors provide access to valuable security intelligence. I wanted to extend the value of that intelligence beyond observation by integrating it into the protection of my own infrastructure.
The objective was to create an automated system capable of identifying when addresses classified as malicious were communicating with protected infrastructure and responding by applying targeted firewall restrictions.
Rather than introducing another dedicated security platform, I chose to build the solution using technologies already available within my environment.
Building a selective threat intelligence pipeline
Not every unsolicited connection is malicious. Internet research, legitimate security scanning and automated service discovery all contribute to the background noise of the internet.
Automatically blocking every address observed by a honeypot would therefore be an unnecessarily broad approach.
Instead, a dedicated automation workflow retrieves observations from my GreyNoise sensors, specifically selecting addresses that GreyNoise has classified as malicious.
These addresses are aggregated into a centrally maintained threat intelligence dataset, providing a reusable source of security intelligence for downstream automation.
This distinction is fundamental to the design. The system does not make enforcement decisions simply because an address has interacted with a honeypot. It uses an established threat classification system to inform those decisions.
By separating intelligence collection from enforcement, the dataset becomes an independent resource that can support multiple security initiatives rather than being tied to a single implementation.
Using the kernel as a data source
One of the more interesting aspects of this project is how network activity is collected.
Traditional approaches to monitoring incoming connections often rely on firewall logging, application access logs or dedicated network monitoring platforms.
While these approaches have their place, they can introduce additional storage requirements, processing overhead and operational complexity.
For this implementation, I chose to use the Linux kernel's native connection tracking subsystem, commonly known as conntrack.
Connection tracking maintains information about network flows as part of the operating system's stateful networking functionality. This provides a useful source of information about network activity without requiring individual integrations with every application or service running on a system.
The collection process was developed through iterative testing against live network activity. The extraction and filtering logic was refined based on observed behaviour, producing address records suitable for automated evaluation.
By leveraging information already maintained by the operating system, the solution avoids introducing a continuously growing connection log or an additional monitoring service solely for this purpose.
A modular approach to security automation
The solution is divided into two independent automation workflows, each with a clearly defined responsibility.
Threat intelligence collection
The first workflow is responsible for retrieving malicious activity observations from the sensor infrastructure and maintaining the central intelligence dataset.
Its responsibility is intelligence collection and preparation, independent of how that intelligence is subsequently used.
Threat intelligence enforcement
The second workflow consumes the intelligence dataset and correlates it with network activity observed on protected infrastructure.
When a correlation is identified, the workflow coordinates an operational notification and a corresponding defensive response through the existing firewall.
This separation allows intelligence collection and enforcement to evolve independently.
Changes to the collection process do not necessarily require changes to the enforcement workflow. Similarly, additional defensive integrations can consume the existing intelligence dataset without requiring their own independent collection mechanisms.
This is an architectural principle I apply across many of my automation projects: components should have clearly defined responsibilities and should be reusable wherever practical.
Targeted enforcement rather than blanket blocking
An intentional design decision was to avoid automatically importing the entire threat intelligence dataset into the firewall of every protected system.
Threat intelligence datasets can contain substantial numbers of addresses, many of which may never interact with a particular piece of infrastructure.
Instead, this implementation uses a correlation-based approach, combining external threat intelligence with locally observed network activity.
This provides additional context for enforcement decisions and keeps firewall restrictions focused on addresses relevant to the protected environment.
The distinction is important. The objective is not simply to accumulate firewall rules, but to use available intelligence to make more informed defensive decisions.
This approach complements existing security controls rather than attempting to replace them.
Operational visibility by design
Automated security decisions should not happen invisibly.
While automation can significantly reduce the manual effort associated with monitoring and responding to threats, it should not remove the operator's awareness of changes being made to their infrastructure.
Operational visibility was therefore treated as a requirement from the beginning, rather than an additional feature introduced after the enforcement logic had been developed.
The workflow incorporates notifications into its controlled enforcement process, ensuring that automated defensive actions are associated with an operational event that can be reviewed.
This provides visibility into detected threats and the defensive responses being initiated without requiring continuous manual inspection of network activity.
For me, this is an important distinction between simply automating a technical task and engineering an operationally useful solution.
Automation should respect the requirements surrounding an action, not just perform the action itself.
Why n8n?
n8n provides the orchestration layer connecting the different components of this solution.
The platform handles intelligence retrieval, data processing, correlation, operational notifications and coordination of firewall changes.
However, n8n is not responsible for the underlying threat classification, network state tracking or firewall enforcement.
Those responsibilities remain with the technologies specifically designed to perform them.
GreyNoise provides threat classification. Linux provides network state information. The existing firewall provides enforcement.
The automation platform connects these capabilities into a cohesive process.
This approach avoids unnecessarily recreating functionality that already exists within established technologies and allows each component to be used for its intended purpose.
It also demonstrates that workflow automation platforms can provide value well beyond conventional business process automation, particularly when applied to infrastructure and security engineering.
Keeping the solution lightweight
A recurring theme throughout my engineering projects is avoiding unnecessary complexity.
There are comprehensive security platforms capable of performing threat intelligence ingestion, event correlation and automated remediation. In larger or more complex environments, those platforms may be entirely appropriate.
For this particular use case, however, the required capabilities were already available within my existing infrastructure.
By combining them through a relatively lightweight automation layer, I was able to establish an additional defensive capability without introducing a dedicated security platform, a separate security database or a new centralised logging deployment.
This reduces the number of components that need to be maintained and allows the solution to fit naturally into the existing environment.
The value comes from how the technologies are integrated, rather than the complexity of the individual components.
Designing for extensibility
Although the initial implementation addresses a specific infrastructure protection requirement, the underlying architecture is not inherently tied to a single system.
The separation between intelligence collection, correlation and enforcement provides a foundation for future expansion.
The centrally maintained intelligence dataset could support additional defensive integrations, broader infrastructure monitoring, security reporting or other automated security processes.
Because the individual components have clearly defined responsibilities, these capabilities can be introduced incrementally rather than requiring a complete redesign.
This allows the solution to evolve alongside the infrastructure it protects.
Engineering takeaway
Threat intelligence becomes considerably more valuable when it can be incorporated into practical operational processes.
By combining selectively classified honeypot intelligence, native Linux networking capabilities, existing firewall controls and workflow orchestration, I have created an additional defensive layer that transforms passive security observations into actionable infrastructure protection.
The project demonstrates several principles that I consider fundamental to effective systems and automation engineering:
- Use established technologies for their intended purposes.
- Separate responsibilities to improve modularity and maintainability.
- Apply intelligence within the context of the environment being protected.
- Incorporate operational visibility into automated decision-making.
- Avoid introducing complexity without a corresponding benefit.
Security automation does not always require a new platform or a substantial infrastructure investment.
Sometimes, the most valuable solution comes from recognising the capabilities that already exist within an environment and connecting them in a more meaningful way.