部署与运维

Enable SSRF protection

Server-Side Request Forgery (SSRF) attacks abuse workflow nodes to make requests to internal network resources, cloud metadata endpoints, or localhost services that shouldn't be accessible.

Enable SSRF protection

text
N8N_SSRF_PROTECTION_ENABLED=true

When enabled, n8n validates all outbound HTTP requests from user-controllable nodes (such as the HTTP Request node) against the configured blocked and allowed ranges. This includes redirect targets and DNS resolution to prevent bypass techniques like DNS rebinding.

Default blocked ranges

When SSRF protection is enabled, the following IP ranges are blocked by default:

Range Description
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 RFC 1918 private addresses
127.0.0.0/8, ::1/128 Loopback
169.254.0.0/16, fe80::/10 Link-local
fc00::/7, fd00::/8 IPv6 unique local
0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24 Reserved/special purpose

You can extend this list with N8N_SSRF_BLOCKED_IP_RANGES=default,100.0.0.0/8.

Allow access to internal services

If your workflows need to reach legitimate internal services, use allowlists. Allowlists take precedence over blocklists, following this order: hostname allowlist > IP allowlist > IP blocklist.

Allow by hostname pattern (supports wildcards like *.n8n.internal):

text
N8N_SSRF_ALLOWED_HOSTNAMES=*.n8n.internal,*.company.local

Allow by IP range:

text
N8N_SSRF_ALLOWED_IP_RANGES=10.0.1.0/24,10.0.2.50/32

Related resources

Refer to SSRF protection environment variables for the full list of configuration options.

Refer to Configuration methods for more information on setting environment variables.

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明