我尝试使用 tsocks 作为 OpenSSH socks5 隧道的 socks-wrapper:
这是我的 tsocks.conf:
wishi@kage ~ % cat /etc/tsocks.conf
# This is the configuration for libtsocks (transparent socks)
# Lines beginning with # and blank lines are ignored
#
# This sample configuration shows the simplest (and most common) use of
# tsocks. This is a basic LAN, this machine can access anything on the
# local ethernet (192.168.0.*) but anything else has to use the SOCKS version
# 4 server on the firewall. Further details can be found in the man pages,
# tsocks(8) and tsocks.conf(5) and a more complex example is presented in
# tsocks.conf.complex.example
# We can access 192.168.0.* directly
local = 192.168.0.0/255.255.255.0
# Otherwise we use the server
server = 192.168.0.1
# Server type defaults to 4 so we need to specify it as 5 for this one
server_type = 5
# The port defaults to 1080 but I've stated it here for clarity
server_port = 5000
所以:
ssh -D 5000 me@server
在另一个终端上:
tsocks transgui
transgui 应用程序没有网络。我想知道问题是什么。
答案1
默认情况下,ssh
仅监听环回接口上的隧道连接 - 尝试将您server
的127.0.0.1
或者::1
。
如果需要从外部连接,请使用ssh -g -D 5000
或ssh -D "*:5000"
。
答案2
使用 ssh -L 而不是 -D
如果我没记错的话,它使用本地端口而不是动态端口,这样可以减少你的麻烦。
ssh -L LOCAL_PORT:服务器:SERVER_SOCKS_PORT 服务器
这样你也可以访问代理服务器在后面ssh 代理