問題描述
在 FreeBSD 中使用 SSH 隧道進行所有流量轉發 (All traffic forwarding using SSH tunnel in FreeBSD)
我像這樣連接到我的遠程 VPS:
ssh ‑f ‑C2qTnN ‑D 1080 username@xxx.xxx.xxx.xxx
然後將 Firefox 代理設置設置為 SOCKS5 和 127.0.0.1:1080。這是工作。
現在我嘗試將所有流量從我的 FreeBSD 重定向到 localhost:1080,但我不知道。你能幫忙嗎?
參考解法
方法 1:
If you want to redirect all traffic, do not use SOCKS5 proxy, but rather use ‑w
option in ssh
, which creates something like VPN connection and its own TUN device, which is more suitable for tunnelling system‑wide traffic.
There are many examples on the internet, for example here. But this is really advanced use case.
(by user4675418、Jakuje)