Network Scanner is a web-based application that scans a given network range to detect devices and their open ports with nmap. It provides an easy-to-use interface for network scanning and displays detailed information about discovered devices.
- Scan network ranges to discover devices.
- Detect open ports and services on the discovered devices.
- Display detailed information including IP address, hostname, state, and port details.
- Lightweight and packaged with Docker.
- Frontend: React
- Backend: FastAPI
- Network Scanning: Nmap
- Containerization: Docker
- Docker
You can use already build image ghcr.io/securityphoton/nmap-gui:
docker run -p 80:80 -p 8000:8000 -d --name NETSCAN ghcr.io/securityphoton/nmap-gui
NOTE!
Use aditional --network host
parametr if you plan ARP scans of local network (in this case ignore HOST:CONTAINER port mapings).
docker run --network host -d --name NETSCAN ghcr.io/securityphoton/nmap-gui:latest
or chose the long way (in case you need some modifications):
-
Clone the repository:
git clone https://github.com/yourusername/network-scanner.git cd network-scanner
-
Build and run the Docker containers:
docker build -t network-scanner . docker run -p 80:80 -p 8000:8000 -d --name NETSCAN network-scanner
-
Open your browser and navigate to
http://localhost:80
to access the application. Or you can change the default 80 port to your preference (for ex. 8080 -> 8080:80)
- Enter the IP range you want to scan (e.g.,
192.168.1.0/24
) in the input field. - Select the type of scan from the dropdown (Discovery Scan, Most Common Ports, All Ports, Custom). Most Common ports include - 21,22,23,25,53,80,110,139,143,443,445,3389,8080,8443.
- Click the "Scan" button to initiate the scan.
- View the scan results, which include detailed information about each discovered device.
frontend/
: Contains the React frontend source code.backend/
: Contains the FastAPI backend source code.Dockerfile
: Dockerfile for building the Docker image.nginx.conf
: Nginx global configuration file.default.conf
: Nginx configuration file for app.
{
"message": "Network scan completed for range: 192.168.1.0/24",
"hosts": [
{
"ip": "192.168.1.1",
"hostname": "",
"state": "up",
"protocols": [
{
"protocol": "tcp",
"ports": [
{
"port": 80,
"state": "open",
"name": "http",
"product": "nginx",
"version": "1.18.0",
"extrainfo": ""
},
{
"port": 443,
"state": "open",
"name": "https",
"product": "nginx",
"version": "1.18.0",
"extrainfo": ""
}
]
}
]
}
]
}
To start the development server for the frontend and backend:
-
Navigate to the frontend directory:
cd frontend
-
Install the dependencies:
npm install
-
Start the development server:
npm start
The React app will be running at http://localhost:3000
.
-
Navigate to the backend directory:
cd backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Start the FastAPI server:
uvicorn main:app --reload
The FastAPI server will be running at http://localhost:8000
.
To build docker image run in project folder:
bash docker build -t network-scanner .
Contributions are welcome! Please fork the repository and submit a pull request for any changes.
This project is licensed under the MIT License.