Quick scan (fast, default ports)
Basic fast scan of common ports (good default).
nmap -T4 -F 127.0.0.1
Useful Network Bits and Pieces
nmcli device wifi show-password sudo vim /etc/systemd/system/disable-wifi.service [Unit]
Description=Disable WiFi
[Service]
Type=oneshot
ExecStart=/usr/sbin/rfkill block wifi
[Install]
WantedBy=multi-user.target sudo systemctl enable disable-wifi.service Router
Useful commands • quick reference
Basic fast scan of common ports (good default).
nmap -T4 -F 127.0.0.1
Detect services and versions on open ports.
nmap -sV 127.0.0.1
Try to fingerprint the remote OS + more verbose output.
nmap -A 127.0.0.1
Popular stealthy scan that sends SYN packets.
sudo nmap -sS 127.0.0.1
Scan individual ports or a range e.g. 22,80,8000-8100.
nmap -p 22,80,8000-8100 127.0.0.1
Scan UDP ports (can be slow and noisy).
sudo nmap -sU 127.0.0.1
Scan top 100 most common ports with aggressive timing.
nmap --top-ports 100 -T4 127.0.0.1
Combines OS/service detection, script scanning, traceroute.
nmap -A --traceroute 127.0.0.1
Save results to files for later parsing.
nmap -oA scan-results 127.0.0.1
Use Nmap Scripting Engine for vulnerability checks.
nmap --script vuln 127.0.0.1
Prometheus
Prometheus is an open-source monitoring system designed for reliability and scalability. It collects time-series data (metrics) from your systems and applications, stores them efficiently, and lets you query them using a powerful language called PromQL. It's especially good for alerting and spotting performance issues in real time.
The easiest way of starting with the Prometheus Operator is by deploying it as part of kube-prometheus. kube-prometheus deploys the Prometheus Operator and already schedules a Prometheus called prometheus-k8s with alerts and rules by default.
git clone https://github.com/prometheus-operator/kube-prometheus.git # Create the namespace and CRDs, and then wait for them to be available before creating the remaining resources
kubectl create -f manifests/setup
# Wait until the "servicemonitors" CRD is created. The message "No resources found" means success in this context.
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
kubectl create -f manifests/
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: main
namespace: monitoring
spec:
resources:
requests:
memory: 400Mi
---
apiVersion: v1
kind: Service
metadata:
name: prometheus-main
namespace: monitoring
spec:
type: NodePort
ports:
- name: web
nodePort: 30900
port: 9090
protocol: TCP
targetPort: web
selector:
prometheus: main
apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
name: main
namespace: monitoring
spec:
replicas: 3
resources:
requests:
memory: 400Mi
---
apiVersion: v1
kind: Service
metadata:
name: alertmanager-main
spec:
type: NodePort
ports:
- name: web
nodePort: 30903
port: 9093
protocol: TCP
targetPort: web
selector:
alertmanager: main
Grafana