So... this is my problem:
I can access to a VPN from my machine. I can access to a server in the VPN via SSH, but this machine has no access inside out because a firewall is blocking the reverse ssh connections. So I can't use Internet via tunnel to use apt-get.
How can I emulate:
sudo ssh -D 9999 root@<machineoutsidevpn>
But from outside the VPN. Or any way to use the Internet connection to install packages?
You need an SSH client that can issue CONNECT requests through the company HTTP proxy. If you're on Windows, using Putty is fine as it has built-in support for tunneling through a HTTP proxy. If you're on unix/linux (or cywgin) you can use openssh with corkscrew to go through the proxy to your home computer's port 443.
With Two-Way SSH tunnel you can connect to any destination under a single condition, which is, the ability to ssh login from the destination to the source. If you can do that, you can as well reverse login from source to destination even if it is behind firewall or NAT.
Computer A
Computer B
ssh into Computer B from Computer A
sudo ssh -R <selected port>:us.archive.ubuntu.com:80 [email protected]
Edit Computer B's /etc/apt/apt.conf
to include the following lines:
Acquire::http::Proxy "http://localhost:<selected port>";
Acquire::https::Proxy "https://localhost:<selected port>";
Run your apt-get update
or install
or upgrade
on Computer B and it should work.
This can also be achieved using Putty (assuming that Computer A is the Windows machine).
<selected port>
us.archive.ubuntu.com:80
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With