From sundial-org-awesome-openclaw-skills-4
Hardens Moltbot/Clawdbot gateways against internet exposure by binding to loopback, setting auth tokens, fixing file permissions, and using Tailscale for secure remote access.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sundial-org-awesome-openclaw-skills-4:moltbot-securityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Your Moltbot gateway was designed for local use. When exposed to the internet without proper security, attackers can access your API keys, private messages, and full system access.
Your Moltbot gateway was designed for local use. When exposed to the internet without proper security, attackers can access your API keys, private messages, and full system access.
Based on: Real vulnerability research that found 1,673+ exposed Clawdbot/Moltbot gateways on Shodan.
When your gateway is publicly accessible:
Prompt injection attack example: An attacker sends you an email with hidden instructions. Your AI reads it, extracts your recent emails, and forwards summaries to the attacker. No hacking required.
Run this to check your current security posture:
clawdbot security audit --deep
Auto-fix issues:
clawdbot security audit --deep --fix
What this does: Prevents the gateway from accepting connections from other machines.
Check your ~/.clawdbot/clawdbot.json:
{
"gateway": {
"bind": "loopback"
}
}
Options:
loopback — Only accessible from localhost (most secure)lan — Accessible from local network onlyauto — Binds to all interfaces (dangerous if exposed)Option A: Token Authentication (Recommended)
Generate a secure token:
openssl rand -hex 32
Add to your config:
{
"gateway": {
"auth": {
"mode": "token",
"token": "your-64-char-hex-token-here"
}
}
}
Or set via environment:
export CLAWDBOT_GATEWAY_TOKEN="your-secure-random-token-here"
Option B: Password Authentication
{
"gateway": {
"auth": {
"mode": "password"
}
}
}
Then:
export CLAWDBOT_GATEWAY_PASSWORD="your-secure-password-here"
What this does: Ensures only you can read sensitive config files.
chmod 700 ~/.clawdbot
chmod 600 ~/.clawdbot/clawdbot.json
chmod 700 ~/.clawdbot/credentials
Permission meanings:
700 = Only owner can access folder600 = Only owner can read/write fileOr let Clawdbot fix it:
clawdbot security audit --fix
What this does: Stops Clawdbot from announcing itself via mDNS/Bonjour.
Add to your shell config (~/.zshrc or ~/.bashrc):
export CLAWDBOT_DISABLE_BONJOUR=1
Reload:
source ~/.zshrc
Older Node.js versions have security vulnerabilities. You need v22.12.0+.
Check version:
node --version
Mac (Homebrew):
brew update && brew upgrade node
Ubuntu/Debian:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
Windows: Download from nodejs.org
What this does: Creates encrypted tunnel between your devices. Access Clawdbot from anywhere without public exposure.
Install Tailscale:
# Linux
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# Mac
brew install tailscale
Configure Clawdbot for Tailscale:
{
"gateway": {
"bind": "loopback",
"tailscale": {
"mode": "serve"
}
}
}
Now access via your Tailscale network only.
For cloud servers (AWS, DigitalOcean, Hetzner, etc.)
Install UFW:
sudo apt update && sudo apt install ufw -y
Set defaults:
sudo ufw default deny incoming
sudo ufw default allow outgoing
Allow SSH (don't skip!):
sudo ufw allow ssh
Allow Tailscale (if using):
sudo ufw allow in on tailscale0
Enable:
sudo ufw enable
Verify:
sudo ufw status verbose
⚠️ Never do this:
# DON'T - exposes your gateway publicly
sudo ufw allow 18789
Disable password auth (use SSH keys):
sudo nano /etc/ssh/sshd_config
Change:
PasswordAuthentication no
PermitRootLogin no
Restart:
sudo systemctl restart sshd
Before deploying:
loopback or lan{
"gateway": {
"port": 18789,
"bind": "loopback",
"auth": {
"mode": "token",
"token": "YOUR_64_CHAR_HEX_TOKEN"
},
"tailscale": {
"mode": "serve"
}
}
}
Based on security research by @NickSpisak_ who found 1,673+ exposed gateways on Shodan.
Original article: https://x.com/nickspisak_/status/2016195582180700592
clawdhub install NextFrontierBuilds/moltbot-security
Built by @NextXFrontier
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin sundial-org-awesome-openclaw-skills-4Audits and hardens Clawdbot/Moltbot installations by checking gateway binding, file permissions, authentication, Node.js version, mDNS, and external accessibility. Guides firewall and Tailscale setup.
Security auditing for Clawdbot deployments: scans for exposed credentials, open ports, weak configs, and vulnerabilities. Auto-fix mode included.
Installs, configures, troubleshoots, and manages OpenClaw AI gateway across 23+ messaging platforms including Slack, WhatsApp, Telegram, Discord, and Teams.