gpt4 book ai didi

python - sshuttle 无法使用 --DNS 路由启动

转载 作者:太空宇宙 更新时间:2023-11-03 18:34:52 43 4
gpt4 key购买 nike

我已成功运行到同一台计算机的隧道,但无法使用 --dns 加载 sshuttle。没有它,它会加载并运行。这是命令行和控制台返回...有什么想法吗?

无论我做什么,我都无法让这个坏男孩在启用 --dns 的情况下启动。

$ sshuttle --dns -vr server:8080 0/0
Starting sshuttle proxy.
Listening on ('127.0.0.1', 12300).
DNS listening on ('127.0.0.1', 12300).
firewall manager ready.
c : connecting to server...
Password:
s: latency control setting = True
s: available routes:
s: 10.0.0.0/8
s: 10.0.0.1/32
s: 10.0.0.3/32
s: 10.0.0.255/32
s: 169.254.0.0/16
c : connected.
Connected.
firewall manager: starting transproxy.
>> ipfw -q add 12300 check-state ip from any to any
>> ipfw -q add 12300 skipto 12301 tcp from any to 127.0.0.0/8
>> ipfw -q add 12300 fwd 127.0.0.1,12300 tcp from any to 0.0.0.0/0 not ipttl 42 keep-state setup
>> ipfw -q add 12300 divert 12300 udp from any to 10.12.4.220/32 53 not ipttl 42
>> ipfw -q add 12300 divert 12300 udp from any to 10.1.8.128/32 53 not ipttl 42
>> ipfw -q add 12300 divert 12300 udp from any to 10.1.8.129/32 53 not ipttl 42
>> ipfw -q add 12300 divert 12300 udp from any 12300 to any not ipttl 42
c : DNS request from ('10.12.64.218', 51288): 23 bytes
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "assembler.py", line 26, in <module>
File "server.py", line 244, in main
File "ssnet.py", line 555, in runonce
File "ssnet.py", line 457, in callback
File "ssnet.py", line 445, in handle
File "ssnet.py", line 384, in got_packet
File "server.py", line 232, in dns_req
File "server.py", line 128, in __init__
File "server.py", line 135, in try_send
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
firewall manager: undoing changes.
>> ipfw -q delete 12300
c : fatal: server died with error code 1

谢谢!

最佳答案

根据我上面的评论,事实证明该错误与 resolv.conf 中的 dnsserver 有关。我不确定将其更改为像 google 或 safeDNS 这样的自定义 DNS 服务器是否是一件坏事,但我做到了,而且现在它正在按预期工作。似乎 resolvconf 程序中的路由存在问题,在这里发现,一个人做了与我类似的事情来解决,但评论者指出了一个更深层次的问题,但没有详细说明如何解决:http://opensourcemissions.wordpress.com/2012/12/03/sshuttle-dns-stopped-working-and-how-i-fixed-it/

关于python - sshuttle 无法使用 --DNS 路由启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21790425/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com