Migrating Tenable Nessus from a Public subnet to a Private subnet in AWS using AMI
This article demonstrates how to securely migrate a Tenable Nessus deployment from a public subnet to a private subnet in AWS using an AMI-based approach. It covers re-registering the Nessus license, enabling secure access through AWS Systems Manager, and ensuring controlled outbound connectivity for plugin updates while eliminating direct internet exposure.
Introduction
In a previous article, I demonstrated how to install and securely access Tenable Nessus Professional on Amazon Linux 2023 using AWS Systems Manager:
While that setup provides secure access without exposing management ports, the instance was deployed in a public subnet. From a security perspective, it is more appropriate to run vulnerability scanners inside a private subnet, where they are not directly accessible from the internet.
Many Tenable customers deploy Nessus in cloud environments to assess internal workloads. In such cases, placing the scanner in a private subnet aligns better with security best practices by reducing unnecessary exposure while still allowing controlled access.
In this article, we migrate the existing Nessus installation to a private subnet using an Amazon Machine Image (AMI) and reconfigure access using AWS Systems Manager.
Architecture Overview

Lab Architecture
Prerequisites
Before proceeding, ensure:
- Existing EC2 instance with Nessus installed (public subnet)
- Private subnet configured
- NAT Gateway deployed in a public subnet
- Private route table configured:
0.0.0.0/0 → NAT Gateway
- IAM role attached to EC2:
AmazonSSMManagedInstanceCore
Step 1 - Create an AMI from the Existing Instance
To preserve the Nessus installation and configuration, create an AMI from the current instance.
Navigate to:
EC2 > Instances > Select instance > Actions > Image and templates > Create image
- Provide a name:
1
Nessus-AMILeave the reboot option enabled to ensure a consistent image.
Wait until the AMI status becomes Available.
Step 2 - Launch a new EC2 instance in the private subnet
Go to EC2 > AMIs, select the AMI you created from the original Nessus instance, and launch a new instance from it.
Configure the instance using the same core settings as the original EC2 instance in the public subnet, except for the subnet placement.
Use the following configuration:
- VPC: Select the same VPC as the original EC2 instance in the public subnet
- Subnet: Select the private subnet
- Auto-assign Public IP: Disabled
- Security Group: Select the same security group used by the original EC2 instance in the public subnet, unless adjustments are required
- IAM Profile: Select the same IAM profile used by the original EC2 instance in the public subnet
- Instance Type: Use the same instance type as the original instance if capacity is available
- Storage: Review and retain the storage configuration from the AMI
In some cases, you may encounter an error indicating that the selected instance type is not available in the chosen Availability Zone. For example:
1
We currently do not have sufficient capacity in the Availability Zone you requested.If this occurs, you can resolve it by either:
- Selecting a different Availability Zone within the same region (for example, switching from
us-east-1atous-east-1b), or - Choosing an alternative instance type with available capacity
After adjusting the configuration, proceed to launch the instance.
Step 3 - Connect using AWS Systems Manager
Since the instance is deployed in a private subnet and does not have a public IP address, you can connect to it using AWS Systems Manager.
In the AWS Management Console:
- Go to EC2 > Instances
- Select your newly launched EC2 instance
- Click Connect
- Choose the Session Manager tab
- Click Connect
This will open a browser-based shell session to the instance without requiring SSH access or a key pair.
Step 4 - Verify Nessus installation
Confirm that Nessus is present:
1
ls /opt/nessusCheck service status:
1
sudo systemctl status nessusdIf the service is not running:
1
2
sudo systemctl start nessusd
sudo systemctl enable nessusdStep 5 - Reset Nessus state
After migration, Nessus must be reset before re-registering the license.
1
2
sudo systemctl stop nessusd
sudo /opt/nessus/sbin/nessuscli fix --resetThis step:
- Clears the plugin database
- Removes existing registration
- Prepares Nessus for a fresh activation
Step 6 - Reset Activation Code in Tenable
Log in to:
Locate your Nessus Professional activation code:
- Click the menu (⋯)
- Select Reset Activation
- Confirm the action
This releases the license from the previous instance.
Step 7 - Re-register Nessus
Register Nessus using your activation code:
1
sudo /opt/nessus/sbin/nessuscli fetch --register <ACTIVATION_CODE>Step 8 - Start Nessus Service
1
sudo systemctl start nessusdStep 9 – Access Nessus via AWS Systems Manager
From your local machine, start a port forwarding session:
1
2
3
4
aws ssm start-session \
--target INSTANCE_ID \
--document-name AWS-StartPortForwardingSession \
--parameters "portNumber=8834,localPortNumber=8834"Then open your web browser and navigate to:
1
https://localhost:8834Once the Nessus interface loads, log in using the same username and password that were configured during the initial Nessus setup on the original instance.
After logging in, Nessus will continue with plugin initialization if it has not yet completed.
Conclusion
In this article, we migrated a Tenable Nessus deployment from a public subnet to a private subnet using an AMI-based approach.
For many Tenable customers operating in AWS, this design provides a more secure way to run vulnerability scanning workloads while maintaining controlled access through AWS Systems Manager.
By combining private subnet deployment, NAT-based outbound access, and IAM-driven connectivity, this approach aligns with common cloud security practices and reduces unnecessary exposure of critical security tools.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article