4
I am a student at a college. In my school, we have this strange rule that after 12 midnight, there is an internal LAN Ban. That means I am able to connect to the internet (external traffic) while sitting in my room, but I can't access most of the internal servers (say B) through the LAN, except for one server (say A). I can ssh to that machine (A) and ping other internal servers (B) and even ssh to them.
My College has its own hosted mirrors (B) for various distributions (http://mirror.cse.iitk.ac.in). I have configured package managers to use this mirror and during the day time, it works flawlessly and downloads happen at a whopping 10+ MB/s (its LAN), but during the nights when the LAN Ban is in action, I have to use other Indian Mirrors to download/update packages which is pathetically slow compared to the former.
What I want to achieve is write a script to route the traffic from server A to my local machine since A can access the mirror (B) even during the LAN Ban hours. I googled it up but didn't get what I wanted to do. In short, I want to setup a reverse-proxy like thing that makes my local machine access the mirror(B) by routing the traffic from A.
Is it possible? I am still a newbie and learning things. Any kind of help would be greatly appreciated.
Thanks in advance!
1
been a while but I guess you could set up a HTTP Proxy on A. SSH -D can do that. OTOH they might not allow that. Another thing you could do is SSH to A, then on A, use wget to download whatever, then find a way to transfer the file from A to your computer so after wget, maybe scp. https://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh
– barlop – 2017-12-23T20:48:35.960Did you try port forwarding via
ssh
? Read TCP FORWARDING inman ssh
, or google for tutorials. – dirkt – 2017-12-24T10:12:47.993I don't have root privileges on that server, so port forwarding is completely out of options.
@barlop I tried that and it works with smaller packages, but we have a storage restriction too (Just 250 MB per student on server A). Moreover, this doesn't work if I wish to update my distro.
Thanks for help anyways! :) – Mayank Sharma – 2017-12-24T11:31:05.600