-   Linux - Networking (
-   -   Setup proxy server using SSH and use yum (

edencraze 07-02-2009 07:08 PM

Setup proxy server using SSH and use yum
My ISP seems to be having some configuration problems cos of which I cant download certain files (mostly exe and msi and some rpm files) as the download either doesnt start (firefox download window showing "Starting..." all the time) or download gets stuck at some point of time.

However I have access to my college computer through SSH using public key authentication and my college computer has internet access 24x7. I would like to be helped with 2 things:
  1. How do I use the internet through my college computer? Like when I use the internet, the requests go through my college computer so it must appear that the requests come from my college computer IP while I use firefox from my home computer
  2. How do I configure yum to download packages through my college computer? I want to setup yum to use the IP of my college computer to download the packages.

In short, I want to use the ISP of my college computer for all internet access from my home.

Can someone help?

edencraze 07-02-2009 08:11 PM

What I managed to do so far is create a SSH tunnel by using the command:
ssh -D 3456

Then after I login, I set firefox to use the proxy setting:
SOCKS Host: Port: 3456

After applying the above firefox setting I am able to use the internet using my home computer & firefox through computer.

Now I set the environment variable http_proxy like
export http_proxy=""
but when I run yum (say yum upgrade) this is a part of the error message that I get:


Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora:
* rpmfusion-free-updates:
* rpmfusion-nonfree-updates:
* rpmfusion-free:
* rpmfusion-nonfree:
* updates: [Errno 4] IOError: <urlopen error >
Trying other mirror. [Errno 4] IOError: <urlopen error >
Trying other mirror. [Errno 4] IOError: <urlopen error >
Trying other mirror. [Errno 4] IOError: <urlopen error >
Trying other mirror. [Errno 4] IOError: <urlopen error >
Trying other mirror. [Errno 4] IOError: <urlopen error >
Trying other mirror.
What could have gone wrong? Please help... Thanks in advance!!!

unSpawn 07-02-2009 08:29 PM

What does 'curl -x' return?

billymayday 07-02-2009 08:29 PM

Have you set the proxy up in yum.conf? Have a look at "man yum.conf" for details.

edencraze 07-02-2009 08:41 PM

@unSpawn: it returned "curl: (52) Empty reply from server"

@billymayday: After you mentioned I added the following lines in /etc/yum.conf

billymayday 07-02-2009 08:45 PM

Why not 3456?

edencraze 07-02-2009 08:48 PM

@billymayday: I was experimenting with various ports thinking that it might be a problem with the port number... Anyways, I once again changed the port to 3456 and proxy= Sorry for mistyping the port number of the discussion

All times are GMT -5. The time now is 12:48 AM.