0

I work in a large organization where some people have extremely restricted internet access and some are given a fairly large amount of freedom. The way my organization manages this is by running a proxy server with minimized restrictions and giving access to the people who need it.

However, I am not sure if I understand this way of setting up a prozy. I am explaining the technique below:

There is a machine to which I ssh -D 9999 username@proxymachine.XYZdomain.com It prompts me for a password and then I log into it and I leave that terminal running ...

then I move to firefox and do the following settings:

enter image description here

And then I am able to use the proxy.

My question is this: How can I use this same proxy to run wget and yum. Both yum and wget have their conf files, but they have options for http_proxy. This peculiar way of using a proxy that we have; can it be "adapted" to wget ? to yum ? if yes, can you please tell em the way to do it ?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Chani
  • 145
  • 8
  • possible duplicate of [Making proxy available on remote server through ssh tunneling](http://serverfault.com/questions/624685/making-proxy-available-on-remote-server-through-ssh-tunneling) – HBruijn Nov 18 '14 at 10:19
  • @HBruijn not really. The questions are quite different – Martin Nov 18 '14 at 13:15

1 Answers1

2

For wget you need to define an environment variable with the your proxy:

export SOCKS_SERVER=127.0.0.1:9999
wget http://example.com

I don't use yum, but apparently you need to define the proxy in /etc/yum.conf

proxy=socks5h://localhost:9999

See https://unix.stackexchange.com/questions/43654/how-to-use-socks-proxy-with-yum

For info on using other programs with SOCKS a simple Google search for "program with socks proxy" should provide plenty of information.

Martin
  • 490
  • 2
  • 5