IPv6服务器上拒绝连接

发布于 2025-02-13 11:01:55 字数 333 浏览 0 评论 0原文

我正在与Django进行一个小小的侧面项目,我想从LAN外部使用该本地服务器。因此,我决定尝试IPv6

我设置washe_hosts = [“*”]并将服务器作为python manage.py runserver -ipv6“ [:: 1]:8000”,但是我无法从另一台PC访问它(即使是从IPv4可以连接到我的WiFi的PC)。我在浏览器中拒绝连接拒绝错误。

是的,我的端口是在防火墙中打开的(sudo ufw允许8000

最后一件事,请与Wireshark核对,我发现TCP软件包已进入服务器。发送第一个标志。

I'm making a little side project with Django and i want to acces this local server from outside my lan. So I decided to try ipv6

I set ALLOWED_HOSTS = ["*"] and run the server as python manage.py runserver --ipv6 "[::1]:8000", but i can't access it from another pc (even from the ones i could with ipv4, connected to my wifi). I get the Connection Refused error in the browser.

And yes, my port is open in the firewall (sudo ufw allow 8000)

One last thing, checking with wireshark, i found the TCP packages get to the server. A RST flag is sent.

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

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

发布评论

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

评论(1

雨轻弹 2025-02-20 11:01:55

:: 1地址是环回地址,带有该地址的数据包在主机外部的网络上不存在。它不能用作网络上的源或目标地址。我认为您打算使用::未指定的地址,该地址将在所有主机地址上收听。

The ::1 address is the loopback address, and packets with that address cannot exist on a network outside the host. It cannot be used as either a source or destination address on a network. I think you meant to use the :: unspecified address that will listen on all host addresses.

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