r/Wordpress • u/Extreme-Cartoonist95 • 6d ago
Hello, tailscale administrator help
Hello, currently im setting up a website for my leatherstore, and i noticed, that payment option would only connect to my account if i didnt use tailscale to only give me access to the administrator, i turned it off and it worked great, but i do not feel safe having it open as it is, so, do you know if any workaraounds that will restrict the access of any other than me, ?
2
Upvotes
1
u/Mani_Khan_Web_Master 6d ago
The usual cause: locking down wp-admin also blocks a couple of URLs that payments need from the public internet, mainly
/wp-admin/admin-ajax.php(checkout uses it on a lot of setups) and the gateway's webhook/callback URL (usually something like/?wc-api=...or under/wp-json/). The gateway's servers aren't on your tailnet, so when they can't reach those, payments "don't connect" or orders sit at pending.What I'd do:
/wp-login.phpand/wp-admin/to your Tailscale range (100.64.0.0/10, or better your specific device IPs), but explicitly allow/wp-admin/admin-ajax.phpfrom anywhere./wp-json/and?wc-api=reachable publicly. Those are what webhooks and the checkout talk to.Rough nginx example:
(On Apache it's the same idea with
Require ipin a .htaccess inside wp-admin plus a<Files admin-ajax.php> Require all granted </Files>exception.)One more check: if you're behind a proxy/CDN, the allow rule must see the real client IP, otherwise everything looks like the proxy's IP and the rule either blocks you or lets everyone in.
Then run a real test order (sandbox mode) and watch the webhook log on the gateway side before going live.
1
u/SuperPerformance3322 6d ago
You could keep Tailscale for admin access but exclude the payment provider’s callback/webhook URLs from the restriction. Payment gateways need to reach those endpoints publicly to confirm transactions. Just make sure only the actual admin login is protected, not the checkout or webhook routes. Also check whether your security plugin or server firewall is blocking the payment requests.
1
u/Winter_Process_9521 6d ago
If you're using a firewall or security plugin to restrict access, configure an exception for the payment gateway's specific webhook endpoint instead of opening the entire administrator area. Don't blindly whitelist an entire API directory,whitelist only the necessary endpoints when possible.
1
u/Ringlau-Temilolu 5d ago
tbh locking the whole admin behind a private network is overkill for an ecommerce store and breaks a lot of background stuff like webhooks and cron jobs. a strong password, 2fa, and basic IP rate limiting on the login page is plenty secure without breaking checkout.
0
u/[deleted] 6d ago
[removed] — view removed comment