LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Setup proxy server using SSH and use yum (http://www.linuxquestions.org/questions/linux-networking-3/setup-proxy-server-using-ssh-and-use-yum-737322/)

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 mycollege.edu

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

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

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

Quote:

Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: ftp.sfc.wide.ad.jp
* rpmfusion-free-updates: astromirror.uchicago.edu
* rpmfusion-nonfree-updates: astromirror.uchicago.edu
* rpmfusion-free: astromirror.uchicago.edu
* rpmfusion-nonfree: astromirror.uchicago.edu
* updates: ftp.oss.eznetsols.org
http://astromirror.uchicago.edu/rpmf...ta/repomd.xml: [Errno 4] IOError: <urlopen error >
Trying other mirror.
http://download1.rpmfusion.org/free/...ta/repomd.xml: [Errno 4] IOError: <urlopen error >
Trying other mirror.
http://fedora.tu-chemnitz.de/pub/lin...ta/repomd.xml: [Errno 4] IOError: <urlopen error >
Trying other mirror.
http://fedora.uib.no/rpmfusion/free/...ta/repomd.xml: [Errno 4] IOError: <urlopen error >
Trying other mirror.
http://fr2.rpmfind.net/linux/rpmfusi...ta/repomd.xml: [Errno 4] IOError: <urlopen error >
Trying other mirror.
http://ftp-stud.hs-esslingen.de/pub/...ta/repomd.xml: [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 127.0.0.1:3456 http://astromirror.uchicago.edu/rpmf...ata/repomd.xml' 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
proxy=http://127.0.0.1:6666/

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=http://127.0.0.1:3456/... Sorry for mistyping the port number of the discussion


All times are GMT -5. The time now is 10:04 PM.