New — one command, zero config

The one command
that prepares your VPS
for real recon.

Local DNS cache, tuned kernel, expanded file descriptors, and swap — all installed and hardened in a single paste. Built for hunters running 100+ concurrent scans.

Read the script
Works on Debian & Ubuntu · Runs as root · Under 30 seconds
root@recon-01 — bash
➜ curl -sSL harden.sh | bash
[✓] installing dnsmasq · binding to loopback
[✓] locking /etc/resolv.conf with chattr +i
[✓] applying sysctl profile · 99-bugbounty.conf
[✓] raising nofile limits → 999,999,999
[✓] allocating 4G swap · /swapfile
━━━━━ VPS HARDENED FOR 100+ SCANS ━━━━━
➜ nuclei -l targets.txt -c 500 -rl 1000

Tuned for the tools you already run

nucleisubfinderhttpxffufkatanaamassnaabugaudnsxchaosnucleisubfinderhttpxffufkatanaamassnaabugaudnsxchaos
What it does

Six changes. Zero babysitting.

Every line does one job — no bloat, no daemons you don't need, nothing that lingers past a paste.

100kcache entries

Local DNS cache

dnsmasq bound to loopback with a 100k-entry cache and Cloudflare + Google upstreams. Resolves are near-instant, even under load.

Immutable resolver

chattr +i on /etc/resolv.conf so nothing overwrites it.

Kernel tuning

Expanded ephemeral port range, TIME_WAIT reuse, huge SYN backlog for parallel workloads.

999Mopen files

File descriptor ceiling

Soft and hard nofile limits raised so scanners never hit EMFILE.

4GBswap

Persistent swap

4GB swap file provisioned and persisted in /etc/fstab.

Idempotent

Re-runnable. Non-fatal errors silenced. No prompts, no surprises.

The one-liner

Copy. Paste. Own the box.

Run as root on a fresh Debian or Ubuntu VPS. Silences non-fatal errors, re-runnable, and finishes in under thirty seconds.

harden.sh · bash
apt-get update -qq && apt-get install -y -qq dnsmasq 2>/dev/null; systemctl stop systemd-resolved 2>/dev/null; systemctl disable systemd-resolved 2>/dev/null; echo "nameserver 127.0.0.1" > /etc/resolv.conf; chattr +i /etc/resolv.conf 2>/dev/null; printf '%s\n' 'bind-interfaces' 'interface=lo' 'no-resolv' 'server=1.1.1.1' 'server=8.8.8.8' 'cache-size=100000' 'neg-ttl=3600' 'dns-forward-max=10000' > /etc/dnsmasq.conf; systemctl restart dnsmasq 2>/dev/null; printf '%s\n' 'net.ipv4.ip_local_port_range=1024 65535' 'net.ipv4.tcp_tw_reuse=1' 'fs.file-max=999999999' 'net.core.somaxconn=65535' 'net.core.netdev_max_backlog=100000' > /etc/sysctl.d/99-bugbounty.conf; sysctl -p /etc/sysctl.d/99-bugbounty.conf 2>/dev/null; printf '%s\n' ' soft nofile 999999999' ' hard nofile 999999999' > /etc/security/limits.d/99-bugbounty.conf; fallocate -l 4G /swapfile 2>/dev/null && chmod 600 /swapfile && mkswap /swapfile 2>/dev/null && swapon /swapfile 2>/dev/null && echo "/swapfile none swap sw 0 0" >> /etc/fstab; echo "===== VPS HARDENED FOR 100+ SCANS ====="
How it works

Four steps. Under a minute.

01

Spin up a fresh VPS

Debian or Ubuntu 22.04+. Root shell required.

02

Copy the one-liner

One click, one clipboard, no editing.

03

Paste and run

Executes end-to-end. No prompts, no interaction.

04

Start scanning

Kick off nuclei, subfinder, httpx — full concurrency.

Before / After

A stock VPS is the bottleneck.

before
  • systemd-resolved hijacks DNS lookups
  • 1024 open-file ceiling → EMFILE at scale
  • Tiny ephemeral port range, no TIME_WAIT reuse
  • No swap · OOM kills mid-scan
  • DNS resolves cost 20–80ms each
after harden
  • dnsmasq bound to loopback, 100k cache
  • 999,999,999 nofile · never blocks
  • Full port range + tcp_tw_reuse enabled
  • 4GB persistent swap in /etc/fstab
  • Sub-millisecond cached resolves
Questions

Quick answers.

Is this safe to run on a production server?+

No. It's designed for disposable VPS instances dedicated to scanning. It disables systemd-resolved and locks /etc/resolv.conf via chattr.

Which distributions are supported?+

Debian and Ubuntu (22.04+ recommended). Any distro with apt, systemd, and chattr should work with minor edits.

Can I re-run it safely?+

Yes. Package installs are idempotent, sysctl values are re-applied, and swap allocation is guarded by fallocate checks.

Does it open any inbound ports?+

No. dnsmasq is explicitly bound to the loopback interface, so no service is exposed to the network.

How do I undo the changes?+

chattr -i /etc/resolv.conf, remove /etc/sysctl.d/99-bugbounty.conf, /etc/security/limits.d/99-bugbounty.conf, and the /swapfile fstab entry, then reboot.

One command. Ship recon today.

Stop tuning boxes by hand. Paste, wait, scan.

View script