Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I solve this error? #440

Open
wg6uq8 opened this issue Nov 12, 2024 · 2 comments
Open

How can I solve this error? #440

wg6uq8 opened this issue Nov 12, 2024 · 2 comments
Labels
question Further information is requested

Comments

@wg6uq8
Copy link

wg6uq8 commented Nov 12, 2024

local install
IP address blocked by policy .
The hostname of the origin is unresolvable (DNS) or blocked by policy.

@kleisauke kleisauke added the question Further information is requested label Nov 19, 2024
@kleisauke
Copy link
Member

By default, access to loopback, link-local, multicast and private IP addresses is denied.

images/ngx_conf/nginx.conf

Lines 119 to 133 in 4133e2f

# Denies access to loopback IP addresses
weserv_deny_ip 127.0.0.0/8;
weserv_deny_ip ::1/128;
# Denies access to link-local and multicast IP addresses
weserv_deny_ip 169.254.0.0/16;
weserv_deny_ip 224.0.0.0/4;
weserv_deny_ip fe80::/64;
weserv_deny_ip ff00::/8;
# Denies access to private IP addresses
weserv_deny_ip 10.0.0.0/8;
weserv_deny_ip 172.16.0.0/12;
weserv_deny_ip 192.168.0.0/16;
weserv_deny_ip fc00::/7;

For self-hosted instances, you can remove those weserv_deny_ip nginx directives from your nginx.conf. For example, in Docker:

# Usage: 
# docker build -t weserv/images .
# docker run -d -p 8080:80 --shm-size=1gb --name=weserv weserv/images
FROM ghcr.io/weserv/images:5.x

RUN sed -i '/weserv_deny_ip/d' /etc/nginx/nginx.conf

@wg6uq8
Copy link
Author

wg6uq8 commented Nov 20, 2024

Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants