1. Caddy version (caddy version
):
2.0
2. How I run Caddy:
Systemctl
a. System environment:
Raspberry Pi (Buster Lite)
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
portainer.mydomain.duckdns.org {
log {
output file /var/log/caddy/portainer.log
}
@internal {
remote_ip 192.168.1.0/24 10.13.13.2/32
}
handle @internal {
reverse_proxy 127.0.0.1:9000
}
respond 403
}
3. The problem I’m having:
I would like to be able to access my services while using Wireguard VPN. Currently when I direct tunnel to my house my phone uses 10.13.13.2 as it’s IP but adding this IP to my Caddyfile doesn’t give me access to those services.
Now technically my phones IP becomes my houses IP (seen on whatsmyip) due to the tunneling and if I add my houses public IP to the Caddyfile I can access my services without problem. The reason I don’t want to use that public IP in the Caddyfile is in the event that it changes I’m now unable to use them and someone else may get that address.
I can access my NAS HDDs just fine through the VPN but none of the Caddyfile pages load while connected unless I put my homes public IP in the file after remote_ip
.
Is there a way to use my domain_name instead of an actual IP? Maybe a matcher being handled a certain way? Since my domain is pointed to my ip and I use DDNS I shouldn’t have a problem even if it changes.
Should I be able to use my 10.x.x.x subnet addressing and access my services? If so is there some kind of configuration I need to make on my server before Caddy will process the request?
4. Error messages and/or full log output:
Pages load https but blank
5. What I already tried:
remote_ip 10.13.13.2/32
remote_ip 10.13.13.1
remote_ip 10.13.13.0/24
remote_ip homes.public.ip (works)
remote_ip mydomain.duckdns.org (error)
Thank you!