You are not logged in.

#1 2010-07-15 15:51:42

oliver
Member
Registered: 2007-12-12
Posts: 448

[solved] how to do this in ssh? (tunnel http via ssh)

I have two servers at work.  One has public internet access and LAN access, the other has LAN access only.

Can I get the one with no internet to somehow push HTTP requests out via the one with access?  Via some kind of ssh tunneling perhaps?  This is for nothing nefarious, it's just tedious to download patches to one box and then push them over to the other.  I just need wget if it makes a difference

Thanks

Last edited by oliver (2010-07-15 16:42:45)

Offline

#2 2010-07-15 16:29:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,333

Re: [solved] how to do this in ssh? (tunnel http via ssh)

Unless I am missing something, I would suggest you set up the server with Internet Access as an Ethernet Bridge or with NAT forwarding.

There are good wiki articles on how to set that up.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2010-07-15 16:35:31

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: [solved] how to do this in ssh? (tunnel http via ssh)

Yeah this is possible. Here is an example with how you could set up ssh tunnelling for pacman:

ssh -f -L 1234:mirrors.kernel.org:80 user@my_internet_server -N

The above example uses the kernel.org pacman mirror but it should work with any mirror. Then in /etc/pacman.d/mirrorlist you would put:

Server = http://localhost:1234/archlinux/$repo/os/x86_64

And then you can do your pacman -Syu.

Edit: The above poster is correct that you should set up NAT/connection sharing if that's possible, but if your work won't let you do that eg. for security reasons then this ssh tunnelling should give you the limited connectivity to make updating easier.

Last edited by Bralkein (2010-07-15 16:39:10)

Offline

#4 2010-07-15 16:42:15

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: [solved] how to do this in ssh? (tunnel http via ssh)

perfect!  Thank you both.

The box with internet access is shared by all groups so I'd rather not do anything system wide to it.  The ssh tunnel is perfect for my scenario.  I can just stick a .wgetrc with the same syntax in my home dir (it's not for pacman)

Offline

Board footer

Powered by FluxBB