How to Configure Rainmap Lite - Web-based Nmap for Network Scanning
Introduction:
Rainmap Lite is a responsive web application that allows users to easily launch Nmap scans from mobile devices, tablets, or web browsers. Unlike its predecessor Rainmap, Rainmap Lite is simpler to deploy and doesn't require special services (such as RabbitMQ, PostgreSQL, Celery, supervisor, etc.). Just install the Django app and add a cron polling task to easily set up a new scan server on any server.
Features:
- Easily launch Nmap scans with a few clicks.
- Responsive interface ensures smooth operation on mobile/tablet devices.
- Send reports via email in all formats.
- View reports from a web browser.
- Schedule scanning tasks.
- Provides dozens of scan profiles for users to choose from.
- Simple installation/setup.
- List items
Screenshot:
Deployment method:
Step 1: Install dependencies
Installation of the configuration described in the official tutorial is very simple, just install the following dependencies:
- Python3
- pip3
- Nmap
- Nmap-scripts
- Cron
Is it really that simple? Unfortunately, there's a catch. The official documentation also mentions it's "compatible with Python 3 (tested under Python 3.7.4)."
Surprisingly, Python 3.10.4 doesn't work, and there are issues with dependency versions. You need to switch to Python 3.7.4 first.
Install and switch to Python 3.7.4
Update the repository
apt update -y && apt upgrade -y
Install dependencies
#Ubtuntu/Debian sudo apt-get install -y make python3-openssl build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev git #CentOS sudo yum install -y gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel
Install Python version management tool pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Open
.bashrc
file/.zshrc
filenano ~/.bashrc #.bashrc nano ~/.zshrc #.zshrc
Modify
.bashrc
file/.zshrc
fileexport PATH="/root/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
Reload
.bashrc
file/.zshrc
filesource ~/.bashrc #.bashrc source ~/.zshrc #.zshrc
Use pyenv to install Python 3.7.4
pyenv install 3.7.4
Switch to Python 3.7.4
pyenv global 3.7.4
Verify Python 3.7.4 installation
python --version
Install remaining dependencies:
sudo apt install python3 nmap #Ubtuntu/Debian sudo yum install python3 nmap #CentOS
Step 2: Clone the project
git clone https://github.com/cldrn/rainmap-lite
Step 3: Configure environment variables
In the root directory of the project, there's a file named .env.sample
. Copy and rename it to .env
. Then, set the following environment variables in the .env
file:
APP_ROOT_PATH
: Application root directory, e.g., "/opt/rainmap-lite/"HTTP_PORT
: Application's HTTP port, e.g., "8000"LOG_PATH
: Path of the log file, e.g., "/var/log/nmaper.log"ADMIN_USER
: Admin username, e.g., "admin"ADMIN_PASS
: Admin password, e.g., "password"ADMIN_EMAIL
: Admin email, e.g., "user@domain.org"BASE_URL
: Base URL of the application, e.g., "http://127.0.0.1:${HTTP_PORT}" (Note: Use public IP if opened to the public, use private IP like 192.168.1.100 if on a local network, use 127.0.0.1 if used on the localhost)SMTP_USER
: SMTP user, e.g., "example@mail.com"SMTP_PASS
: SMTP password, e.g., "s3cr3tp4ssw0rd"SMTP_SERVER
: SMTP server, e.g., "smtp.mail.com"SMTP_PORT
: SMTP port, e.g., "587"SMTP_DOMAIN_NAME
: SMTP domain name, e.g., "mail.com”
Step 4: Run the installation script
In the project root directory, enter the following command to start the automatic installation:
sh setup.sh
Note: There's an issue in the project. The address you should visit is the BASE_URL
you just set. The terminal always outputs 0.0.0.0:HTTP_PORT
.
Related Links:
GitHub Address: https://github.com/cldrn/rainmap-lite
Original link:http://enblog.fuyiran.link/Technology/3.html
Copyright: All posts on this blog, unless otherwise stated, are published using theCC BY-NC-SA 4.0 license agreement. Please indicate the source for reprinting Fu Speaking (enblog.fuyiran.link)