IPv6服务器上拒绝连接
我正在与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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
:: 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.