Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2905

how to set up ssh tunnel for apt-get update on WSL2?

$
0
0

My local machine has Ubuntu 23.10 on Win 10 WSL2. The local machine has no direct access to public Internet. It has access to a portal machine which communicates with public Internet.

How can I run sudo apt-get update and sudo do-release-upgrade on my local machine via the proxy machine?

I have /etc/apt/apt.conf.d/proxy.conf as:

Acquire::http::proxy "socks5h://localhost:8080";Acquire::https::proxy "socks5h://localhost:8080";

And have ssh -D 8080 -q -C -N <user_name>@<portal machine> running.

But release update got an error message:

<user_name>@deskwin10:~$ sudo do-release-upgradeproxy 'socks5h://localhost:8080' looks invalidChecking for a new Ubuntu releaseFailed to connect to https://changelogs.ubuntu.com/meta-release. Check your Internet connection or proxy settingsNo new release found.

Note that this Ubuntu runs on WSL2. I can set up the ssh tunnel between the local machine and the portal to use Windows browser on the local machine. I wonder how the WSL2 Ubuntu can also communicates via the tunnel.


Viewing all articles
Browse latest Browse all 2905

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>