Code Coca

How to setup system wide proxy in kali linux

1. We create a file under /etc/apt/apt.conf.d/ , here we name it apt-proxy.conf, note the name can be anything we like.

Here's an example of how to set up proxy:

kali linux
sudo nano /etc/apt/apt.conf.d/apt-proxy.conf

2. Now we put the following content

kali linux
Acquire {
HTTP::proxy "http://127.0.0.1:3128/";
HTTPS::proxy "http://127.0.0.1:3128/";
}

3. Exit and Save the file, Ctrl + X, Y, Enter key

4. Now apt will use the proxy settings to get updates and installing packages etc.

kali linux
sudo apt update

Alternatively we can replace

kali linux
Acquire {
HTTP::proxy "http://127.0.0.1:3128/";
HTTPS::proxy "http://127.0.0.1:3128/";
}

With

kali linux
Acquire::http::Proxy "http://user:password@proxy.server:port/";
Acquire::https::Proxy "http://user:password@proxy.server:port/";

Alternative proxy types

kali linux
# for socks proxy
Acquire::socks5::proxy "socks://127.0.0.1:1080/";
# For applying proxy server toFTP type of file transfer as well
FTP::proxy "http://127.0.0.1:3128/";

Note :

127.0.0.1:3128 or 127.0.0.1:1080 from examples should be replaced with correct/proper proxy IP_address:Port

Background

Since Proxmox VE(PVE) is based on Debian, it uses the same package management tool (apt), thus if we have multiple PVE instance running, we can configure the proxy for them, this will make the update/upgrade process faster (Once the first node has downloaded the new packages the other nodes will only need to download from the cache directly, this should work for PVE cluster and non-cluster PVE nodes).

The same logic applies to Ubuntu/Debian etc.

No comments:

Post a Comment