Table of contents
1. Prepare the docker environment server (omitted)
3.2 Official registration to obtain activation code
3.3 Use the challenge code and activation code to obtain the plug-in download address
3.4 Copy the downloaded plug-in and license agreement into the container
Preface: Install Nessus using docker
1. Prepare the docker environment server (omitted)
2. Installation
2.1 Search mirror
docker search nessus
2.2 Pull the image
docker pull tenableofficial/nessus
2.3 Start the image
docker run -itd --name my-nessus --restart=always -p 8834:8834 tenableofficial/nessus
3. Update the plug-in offline (you can do step 4 first)
3.1 Get challenge
# 1、进入容器
docker exec -it 容器ID /bin/bash
# 2、切换到nessus安装目录下的sbin文件夹中,
cd /opt/nessus/sbin
# 3、使用如下命令生成challenge码
./nessuscli fetch --challenge
# 3d88e6e1b11c0d9323f1bf897634944a20b825d4
3.2 Official registration to obtain activation code
Log in to the email address you entered to get the activation code
3.3 Use the challenge code and activation code to obtain the plug-in download address
Click me to get the plug-in download address
After submitting, download the license file named [nessus.license]
Download the plug-in, the file name is [all-2.0.tar.gz]
3.4 Copy the downloaded plug-in and license agreement into the container
Copy the downloaded plug-in file and license agreement file to the /opt/nessus/sbin directory of Nessus, and execute the following command to update the plug-in. As follows:
First copy the downloaded 2 files to a folder of the host machine (I am a virtual machine, which is equal to copying from a windows machine to a virtual machine)
# 这里会涉及从主机复制东西到容器的命令!!!!!!!!!
#从容器往宿主机copy
#sudo docker cp 容器id:/path_in_container /path_on_host
#从宿主机往容器copy
#sudo docker cp /pathonhost 容器id:/容器的路径
# 我使用这2个命令
sudo docker cp /opt/nessusfiles/nessus.license 2bcf38bf345e:/opt/nessus/sbin
sudo docker cp /opt/nessusfiles/all-2.0.tar.gz 2bcf38bf345e:/opt/nessus/sbin
View the copy result:
Excuting an order
./nessuscli fetch --register-offline nessus.license
./nessuscli update all-2.0.tar.gz
After the plugin update is complete, restart the Nessus service. Then, revisit the Nessus service, and the plugin can be successfully loaded
4. Login
Below: Skip
The following figure uses the activation code received by email
If you can't add users, see the appendix
appendix
## 进入容器 注意sbin目录的位置根据个人的设置进行相应的修改,按提示操作,完了要重启
/opt/nessus/sbin/nessuscli adduser 要添加的用户名