Skip to main content
26 votes

Unable to add gpg key with apt-key behind a proxy

Here is a solution that uses http via curl instead of trying to proxy apt-key or gpg: curl -sSL \ 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xBBEBDCB318AD50EC6865090613B00F1FD2C19886' ...
Dan Anderson's user avatar
  • 1,231
12 votes

How to unset the 'http_proxy' environment variable in Python

Each invocation of os.system() runs in its own subshell, with its own fresh environment: >>> import os >>> os.system("echo $$") 97678 0 >>> os.system("echo $$") 97679 0 You ...
DopeGhoti's user avatar
  • 79.2k
11 votes
Accepted

On-demand SSH Socks proxy through systemd user units with socket-activation doesn't restart as wished

Can /usr/bin/ssh really not accept systemd-passed sockets? I think that's not too surprising, considering: OpenSSH is an OpenBSD project systemd only supports the Linux kernel systemd support would ...
Vladimir Panteleev's user avatar
10 votes

Setting up Proxy Settings on Debian

The following is for general proxy, apt and wget and you can remove the user:password@ for a proxy that doesn't require it: For General proxy: touch /etc/profile.d/proxy.sh add the following: ...
Emmanuel Mahuni's user avatar
9 votes

On-demand SSH Socks proxy through systemd user units with socket-activation doesn't restart as wished

For future reference, i'm pasting below the systemd --user configuration files for on-demand ssh-tunnel using systemd-socket-proxyd daemon, with various enhancements and explanation comments: ~/....
ankostis's user avatar
  • 593
9 votes
Accepted

netcat missing -x option

Looks like you have the "traditional" netcat (netcat-traditional) installed. The -x option is available in the OpenBSD netcat (netcat-openbsd). See also: What are the differences between ...
muru's user avatar
  • 77.9k
8 votes
Accepted

Force an application's traffic through a SOCKS proxy

Wikipedia lists a number of open-source proxifiers. Of those, proxychains-ng seems to be the most actively developed, judging by GitHub activity. To install and configure, Download the latest release ...
Dan Dascalescu's user avatar
8 votes
Accepted

Prevent requests to 127.0.0.1 from being forwarded to http_proxy

From wget man page: ENVIRONMENT Wget supports proxies for both HTTP and FTP retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment ...
telcoM's user avatar
  • 114k
7 votes

What tool can I use to sniff HTTP/HTTPS traffic?

mitmproxy/mitmdump Equalivant to tcpdump for HTTPS is mitmdump. Here are the steps: Install mitmproxy package (macOS: brew install mitmproxy). Install mitmproxy CA certificate by the following ...
kenorb's user avatar
  • 22.1k
6 votes

Serve Internet to remote machine via SSH session?

You can use -R flag with SOCKS4/5 behavior, this is built-in and it does not require a long command as proposed by @smammy: [hasinet]$ ssh -R 1080 noinet You can use the proxy like e.g. [noinet]$ ...
AkiRoss's user avatar
  • 643
6 votes

Bash Script - Setting Local Environment Variables (Proxy)

It looks like there are several mistakes here. First, your variable assignment expressions shouldn't be inside backticks. The backticks are a (somewhat dated) syntax for command substitution. I think ...
igal's user avatar
  • 10.2k
6 votes
Accepted

Proxy setting: How to keep my password more secure

Someone getting the password from your terminal is the least of your problems. The bigger problem is that using the proxy via a non-encrypted protocol over the network, your login and password can ...
Rui F Ribeiro's user avatar
5 votes
Accepted

Proxy settings for CentOS 8 not working

Turns out the dnf has changed the way it deals with proxies. If you’re using a basic proxy authentication then you need to specify it: vi /etc/dnf/dnf.conf # proxy settings proxy=http://proxy.domain....
markb's user avatar
  • 143
5 votes

netcat missing -x option

There are multiple implementations of netcat, you probably want the BSD one, because it provides the -x option. In Ubuntu it is available in the netcat-openbsd package.
Vojtech Trefny's user avatar
5 votes

Can you configure NGINX to redirect a HTTP request to SSH connection?

This is a good question. Yes you can use nginx to redirect SSH traffic. In the following example, nginx will redirect traffic, according to protocol. This means that nginx is able to identify SSH ...
Bruce Malaudzi's user avatar
4 votes

On-demand SSH Socks proxy through systemd user units with socket-activation doesn't restart as wished

Due to the reputation system, I'm not able to comment @ankostis solution... I suspect that systemd has options to avoid the use of a bash sleep-loop Yes, there is systemd-notify. Also incorporating @...
Mathias Kresin's user avatar
4 votes
Accepted

iptables rules on squid proxy machine

You seem to have used sport instead of dport and vice versa in the firewall rules. It should be: iptables -A INPUT -p tcp -s "$my_pc_ip" --dport 3128 -m state --state NEW,ESTABLISHED -j ACCEPT ...
enZyme's user avatar
  • 364
4 votes

How to unset the 'http_proxy' environment variable in Python

Each call to os.system() is creating a separate process. Do echo $$ inside them both to see that the PID changes with each. So your first os.system() spawns a new process which inside of itself ...
chicks's user avatar
  • 1,126
4 votes

Does SSH ProxyJump require local shell access?

In my testing on OpenSSH 7.4, specifically: $ ssh -V OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 I was able to set my user's shell to either /sbin/nologin or /bin/false and was able to log into ...
slm's user avatar
  • 380k
4 votes

OpenBSD relay, https proxy for multiple domains

As of OpenBSD 6.6, relayd now supports SNI. Check the man page for the "tls keypair" option. You can specify this option multiple times to cover as many domains as you want: http protocol "...
Antonis Anastasiadis's user avatar
4 votes

How is SOCKS protocol used in SSH dynamic port forwarding?

The SSH protocol permits multiplexing multiple independent data streams through one TCP connection. Each data stream is called a channel. All data sent through the TCP connection is encrypted. The ...
Kenster's user avatar
  • 3,587
4 votes
Accepted

Do any open source HTTP/HTTPS proxies exist that support PAC?

Yes, there are projects such as pacproxy. A widely used proxy, Shadowsocks, internally uses PAC too.
hanxue's user avatar
  • 611
4 votes

Cannot install packages with apt-get update in debian (Proxy)

Create a /etc/apt/apt.conf.d/http-proxy.conf with the following line: Acquire::http::Proxy "http://user:[email protected]:8080/"; Then run: export http_proxy=http://user:[email protected]:...
GAD3R's user avatar
  • 69.9k
4 votes

Certificates on WSL

I'm not sure, which commands you tried exactly (as the case may be, my hints are less helpfull). 1. this commands works for me (without DPI-Firwall) sudo apt-get update sudo apt-get install wget ca-...
user433585's user avatar
4 votes

Why does socat fail at proxying X11 where ssh succeeds?

One or more X extensions (I think DRI is one of them) send file descriptors over the unix domain socket and using send/recv doesn't proxy these file descriptors. Instead you have to use sendmsg/...
William Henning's user avatar
4 votes
Accepted

Apt-get and mirrors errors or failed to fetch

It looks like your machine is trying to resolve a host literally named proxy_server. Try ping -c 5 proxy_server to see if it has an IP listed and if you can hit it over ICMP. If you are indeed ...
rubynorails's user avatar
  • 2,404
3 votes

Get transmission web interface working with web server

There is a working sample in Linuxserver.io repository. https://github.com/linuxserver/reverse-proxy-confs/blob/master/transmission.subfolder.conf.sample If you are not using docker, the configuration ...
yananet's user avatar
  • 31
3 votes

How to use socks proxy for commands in Terminal such as youtube-dl?

Since youtube-dl version 2016.05.10, you can use --proxy to specify SOCKS proxy, e.g. youtube-dl --proxy "socks5://127.0.0.1/" -v 9bZkp7q19f0 --proxy URL Use the specified HTTP/HTTPS/SOCKS proxy. ...
kenorb's user avatar
  • 22.1k
3 votes
Accepted

How to enable presistent proxy_arp

You can do it two different ways. First, you can target a specific interface (enp3so in this case): # The next line enables proxy arp for IPv4 on the main Ethernet port only net.ipv4.conf.enp3s0....
macNCheeseB's user avatar
3 votes
Accepted

Configuring no_proxy on centOS

Solved. I was appending asterisk(*) in the no_proxy ( *.org.in) which caused the issue. The issue is resolved after removing the *.
Raj's user avatar
  • 203

Only top scored, non community-wiki answers of a minimum length are eligible