2

I am using Ubuntu 20.04 LTS and sharing my phone internet connection which is using http tunneling, with my Ubuntu laptop. The app on the phone provides a proxy IP and a port to connect to it's internet. I have added those proxy IP and port on Ubuntu network proxy settings

enter image description here

I can use that Internet connection to browse the Internet and works well on the browser but, cannot use the terminal to update Ubuntu. It gives me this bad request error.

nuwan@myUbuntu:~$ sudo apt update
Hit:1 http://packages.microsoft.com/repos/vscode stable InRelease                                                                     
Hit:2 http://linux.teamviewer.com/deb stable InRelease                                                                                
Hit:3 https://repo.steampowered.com/steam stable InRelease                                                                            
Err:4 http://ppa.launchpad.net/mkusb/ppa/ubuntu focal InRelease                           
  400  Bad Request [IP: 192.168.43.69 44355]
Err:5 http://us.archive.ubuntu.com/ubuntu focal InRelease           
  400  Bad Request [IP: 192.168.43.69 44355]
Err:6 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease     
  400  Bad Request [IP: 192.168.43.69 44355]
Get:7 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Err:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
  400  Bad Request [IP: 192.168.43.69 44355]
Err:9 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
  400  Bad Request [IP: 192.168.43.69 44355]
Get:10 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,090 B]
Reading package lists... Done         
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://ppa.launchpad.net/mkusb/ppa/ubuntu focal InRelease' is no longer signed.
E: Failed to fetch http://ppa.launchpad.net/mkusb/ppa/ubuntu/dists/focal/InRelease  400  Bad Request [IP: 192.168.43.69 44355]
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' is no longer signed.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal/InRelease  400  Bad Request [IP: 192.168.43.69 44355]
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' is no longer signed.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  400  Bad Request [IP: 192.168.43.69 44355]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  400  Bad Request [IP: 192.168.43.69 44355]
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  400  Bad Request [IP: 192.168.43.69 44355]
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-security InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I found some related questions like this, but they didn't help my problem. what is the problem here? (IP address differs from the one in the image because I removed the image and re added code with new result)

1 Answers1

0

the correct way is this:

Edit your /etc/apt/apt.conf and add this:

Acquire::http::Proxy "http://192.168.43.104:44355";
LeoLopez
  • 196
  • 5