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-upgrade
proxy 'socks5h://localhost:8080' looks invalid
Checking for a new Ubuntu release
Failed to connect to https://changelogs.ubuntu.com/meta-release. Check your Internet connection or proxy settings
No 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.

1
  • 1
    Does sudo apt update work? Or do both apt and do-release-upgrade fail?
    – muru
    Commented Jun 20 at 10:13

0

You must log in to answer this question.

Browse other questions tagged .