2

I have a windows machine having IP 10.5.1.60,lets call it X. I can connect to a linux machine over SSH,having IP 10.1.32.7,lets say Y. Y uses a HTTP proxy to 10.25.0.42:3128 to connect to internet,i.e. on Y,you open browser,provide credentials and you are on internet.

Now i want to access internet from X through Y(via SSH).

X(10.5.1.60)--SSH-->10.1.32.7--Http proxy-->10.25.0.42:3128-->Internet.

This is what i have tried so far: 1.Installed putty for windows.Under the connections settings in SSH,added a dynamic port 4567 as source ,and added 10.25.0.42:3128 as destination.Opened the connection,logged into 10.1.32.7.Opened my windows firefox,added 127.0.0.1:4567 as SOCKS 5 proxy (remote dns enabled). But still no internet!!

2.Tried installing Bitvise SSH for windows.Added a rule in C2S settings for localhost:4567 to 10.25.0.42:3128.....still nothing.Tried changing it to localhost:4567 to 10.1.32.7:80,can access the apache server page on 10.1.32.7

3.Installed MiniGW on windows and typed:

ssh -N -L 8080:10.25.0.42:3128 myusername@10.1.32.7

The terminal asks for password,after providing which it freezes.

Can someone guide me how can I access internet on my PC?

1

Solution

Your first method was close try, this:

  1. Open Putty
  2. Host Name= 10.1.32.7
  3. Port= 22
  4. Go to Connection then SSH then Tunnels
  5. Source port= 4567
  6. Destination= 10.25.0.42:3128
  7. Tick Local
  8. Click Add
  9. Go back to Session
  10. Then click Open
  11. Open Firefox
  12. Open Options
  13. Go to Advanced then Network then Settings
  14. Tick Manual proxy configuration
  15. HTTP Proxy= 127.0.0.1
  16. Port= 4567
  17. Tick Use this proxy server for all protocols
  18. Click OK

Explanation

What I have done is made ssh listen to port 4567 on X, then sends any data to 10.25.0.42:3128 by going through Y. This is what local does; but dynamic makes ssh act like a proxy, so it will have to handle connections to determine destination.

  • Thanks a lot lot lot!!!! You literally made it man!! I was so close.......and i was trying to solve this through weeks.Again thanks a lot,you made my day(and my 4 years of hostel life too...:)) – Srajan Soni Aug 31 '16 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.