mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 05:39:49 -05:00
[GH-ISSUE #741] Bypass Rules work only with Path and not IP or IP Range #1603
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dpurnam on GitHub (May 17, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/741
Thank you very much for such a great thing.
I've been testing Pangolin in an attempt to shift away from Cloudflare Tunnels.
Using the Target Rules based on IP Address (IPv4 or IPv6 - single or ranges) does not work.
However, the Target Rules based on path (for ex. /api/*) works fine on the same target, but this is a lot less secure than those based on IP addresses.
Debug logs:
2025-05-17T10:59:20.437Z [debug]: Verify session: Badger sent {"sessions":{},"originalRequestURL":"https://certs.example.com/","scheme":"","host":"certs.example.com","path":"/","method":"GET","tls":true,"requestIp":"[<correct-public-ipv6-host2>]:51002","headers":{"Accept":"*/*","User-Agent":"curl/7.88.1","X-Forwarded-Host":"certs.example.com","X-Forwarded-Port":"443","X-Forwarded-Proto":"https","X-Forwarded-Server":"amdvpn","X-Real-Ip":"<correct-public-ipv6-host2>"}} 2025-05-17T10:59:20.440Z [debug]: No more auth to check, resource not allowed 2025-05-17T10:59:20.440Z [debug]: {"data":{"valid":false,"redirectUrl":"https://pangolin.example.org/auth/resource/10?redirect=https%3A%2F%2Fcerts.example.com%2F"},"success":true,"error":false,"message":"Access denied","status":200} 2025-05-17T10:59:23.995Z [debug]: Verify session: Badger sent {"sessions":{},"originalRequestURL":"https://certs.example.com/","scheme":"","host":"certs.example.com","path":"/","method":"GET","tls":true,"requestIp":"[<correct-public-ipv6-host1>]:45430","headers":{"Accept":"*/*","User-Agent":"curl/7.88.1","X-Forwarded-Host":"certs.example.com","X-Forwarded-Port":"443","X-Forwarded-Proto":"https","X-Forwarded-Server":"amdvpn","X-Real-Ip":"<correct-public-ipv6-host1>"}} 2025-05-17T10:59:23.996Z [debug]: No more auth to check, resource not allowed 2025-05-17T10:59:23.996Z [debug]: {"data":{"valid":false,"redirectUrl":"https://pangolin.domain.com/auth/resource/10?redirect=https%3A%2F%2Fcerts.example.com%2F"},"success":true,"error":false,"message":"Access denied","status":200}I did not use the installer but a manual docker compose and using HOST docker network_mode because using user mode pangolin network kept causing DNS 53 errors.
gerbil section in config.yml
I feel it's some wrong configuration somewhere, I'm unable to figure out.
@dpurnam commented on GitHub (May 21, 2025):
It gets weirder with IP based rules.
Why would badger treat a whitelisted IPv6 address defined under Resource Rules as an IPv4 Octet?
Additionally, I get 'internal server' error upon browsing the resource, if a combination of Active IP rules exists which includes both - IPv4 address/range along with IPv6 address/range
Accessing the Resource redirects to Pangolin Auth (and not 'internal server' error page) either with only IPv4 rules activated or only IPv6 rules activated.
I can conclude that, in my setup:
@github-actions[bot] commented on GitHub (Jun 5, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@slimshizn commented on GitHub (Jun 5, 2025):
Still an issue.....
@miloschwartz commented on GitHub (Jun 5, 2025):
Will look into this
@dpurnam commented on GitHub (Jun 24, 2025):
After upgrading to latest versions as below, this issue doesn't exist anymore. Thank you so much.
Pangolin Image -
1.5.1 (from 1.4.0)Badger Plugin -
1.2.0 (from 1.1.0)