基于 IP 的暂存区保护...如果我的客户端有动态 IP 怎么办?

发布于 2024-09-24 13:27:13 字数 178 浏览 2 评论 0原文

我正在尝试为即将推出的网站设置在线临时区域...我通常宁愿使用 htaccess 规则来仅允许我和我的客户查看该网站...我认为更安全,您不需要记住密码等等...

但是我的客户这次有一个互联网提供商,他不给他一个静态IP,显然每天左右,他的IP变化...所以我必须更改我的htaccess!

有什么解决办法吗?

I'm trying to put online a staging area for an upcoming website... I'd usually rather use an htaccess rule to enable only me and my client to see the website...i think is safer and you dont need to rememebr passwords and so...

but my client this time has an internet provider who doesnt give him a static ip, aparently everyday or so, his ip chamges...so i have to change my htaccess!

there is any solution for that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧时模样 2024-10-01 13:27:13

首先,动态IP非常常见,许多提供商每隔12或24小时就会断开客户端连接,这通常意味着他们会分配一个新的IP。

其次,仅仅给出用户名/密码组合不仅看起来更安全,而且更省事。您将要投入时间到一个可能不值得的解决方案上。我也不知道如何获取客户端的有效 IP 地址来更新 .htaccess 文件,除了让客户端安装更新动态 DNS 条目的服务之外,这可能比记住登录更麻烦,如果你问我。

First of all, dynamic IPs are very common, a lot of providers disconnect the client in intervals of 12 or 24 hours, which usually means they get a new IP assigned.

Second, just giving out a username / password combination not only seems safer, but also more hassle-free. You are about to invest time into a solution that's probably not worth it. I also don't see how you would obtain the valid IP address of the client to update your .htaccess file, apart from having the client install a service that updates a dynamic DNS entry mayb - more of a hassle than remembering a login, if you ask me.

长梦不多时 2024-10-01 13:27:13

您可以让他使用动态 DNS 服务,例如 dyndns.com 或 no-ip.com。这样他就可以设置像 someguy.dyndns.com 这样的域名,该域名始终会解析为他的 IP(不过他可能需要安装一个小型守护程序/服务/程序来自动更新 IP)。然后,您可以在 .htaccess 中添加一条规则,例如 allow from someguy.dyndns.com

You could have him use a dynamic DNS service like dyndns.com or no-ip.com. That way he can setup a domain name like someguy.dyndns.com which would always resolve to his ip (he'll probably need to install a small daemon/service/program to automatically update the IP though). Then you can add a rule into your .htaccess like allow from someguy.dyndns.com.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文