For a legal cybersecurity reconnaissance assessment of your own Linux server/network, I would structure it like this:
1. Passive reconnaissance
Gather information without directly probing the target:
whois example.com
dig example.com
dig MX example.com
dig NS example.com
DNS enumeration:
dig +short A example.com
dig +short AAAA example.com
dig +short TXT example.com
2. Identify your network
On your Linux machine:
ip addr
ip route
hostname -I
See your listening services:
3. Local network discovery
For a network you own or administer:
sudo nmap -sn 192.168.1.0/24
This identifies responding hosts without performing a full port scan.
4. Scan your own server
Basic:
sudo nmap -sV <SERVER_IP>
More detailed service detection:
sudo nmap -sV -sC <SERVER_IP>
Operating-system detection:
5. Web reconnaissance
For your own web server:
curl -I https://example.com
Check HTTP headers:
curl -sD - -o /dev/null https://example.com
Technology discovery can be done with tools such as:
whatweb https://example.com
6. Save the reconnaissance results
mkdir -p ~/recon/example.com
nmap -sV -sC <SERVER_IP> \
-oA ~/recon/example.com/nmap
dig example.com ANY \
> ~/recon/example.com/dns.txt
curl -sD ~/recon/example.com/headers.txt \
-o /dev/null https://example.com
That gives you a basic reconnaissance evidence set that you can subsequently analyze for unnecessary exposed services, outdated software, weak configurations, and attack surface.
If you're working specifically with your Gentoo/Linux machine, I can also give you a complete recon.sh script that performs this assessment and produces an HTML report.