PDA

View Full Version : Private SSH tunnel



gaijin_punch
Jul 5, 2014, 09:57 AM
I don't need a ton of directions. If it comes down to it, I'll use the AWS method if I have to. But, I've got a friend I play with here in Japan who says I can dump off a Linux box at his place box before I repatriate to the US. In theory, if he's got an SSH server running on that box, can I run an SSH tunnel there, and then use something on Windows to tell it point all traffic to the SSH port on that machine? I use Windows for one thing: PSO2. I assume one of the tools in the AWS thread would work?

I've got some experience w/ SSH tunnels (on the terminal only), and more specifically squid which I *assume* could work but I've not really tested any of this. I got about 6 weeks before I throw the parachute.

Cheers.

nanamin
Jul 5, 2014, 11:25 AM
AWS is nothing special, it's basically a unix server. Therefore what you're trying to accomplish should not be a problem. However, do make sure to setup the router / SSH so that you can access the server when your back in the US.

In other words either configure SSH to use an already open port, or setup the router so that it uses the default port 22 for SSH. I recommend to change the default port to something else for security reasons. I'd also try to connect to this server whilst you still have physical access, in order to make sure the authentication has no issues.

Also if it's at a friends house, make sure to get a low energy consuming / quiet (preferably silent) machine. ^^

gaijin_punch
Jul 5, 2014, 11:30 AM
The server sucks and is loud. :). But it just needs a new fan.

Noted in changing the default port. I have access to all my machines and the external poet is never 22. So is it as easy as the command (which I don't have handy) which listens in a port and forwards traffic to an IP?

nanamin
Jul 5, 2014, 12:29 PM
Once you've installed Linux (I prefer Debian), install OpenSSH.

apt-get install openssh-server

Below should give you a general idea:
https://wiki.debian.org/SSH

Then go in to the configuration file for SSH and change the port listed there.
Follow below guide or similar:

http://www.linuxlookup.com/howto/change_default_ssh_port (http://www.linuxlookup.com/howto/change_default_ssh_port)

Next go into your routers settings and forward the port you've just set for SSH.

Authentication and security countermeasures can get a bit tricky, but there are plenty of guides on how to do that. Google is your friend!

The client side (windows) is pretty much the same as the AWS guide.

EDIT: Depending on how much the new fan costs, it may be clever to just get a junk fan-less laptop with a broken monitor, or Raspberry Pi since they generally cost around 4500yen, and pretty much silent super low energy.

Boy do I miss Japan ><

gaijin_punch
Jul 6, 2014, 10:09 AM
Thanks, dude.

Once upon a time, I was really, really gung ho about Gentoo. I guess I still am, but mainly b/c I never bothered with anything else, and have since moved away from the admin side of things. Portage I like, even though it can be a whore. I've messed around a bit with Debian and some similar flavors but I'll be damned if I ever got the package manager to do what I wanted. I recently installed Linux Mint on a laptop when I needed an X-Server pronto for a job interview.I got the X-Server, but ssh-server I could not get going. :-/ Kind of necessary for the task at hand, no? :)

I assume SSH keys would be fine in terms of authentication. I need to get the box to my buddy first.


Boy do I miss Japan ><

I feel that. I moved away once when I wasn't ready... to a city I had no affection for. Bad combo. I moved back after 2 years. I think I've had my fill though. The stagnant economy is starting to get on my nerves. I will be leaving behind some very tight friendships, but the right decision is almost never the easy one. Fingers crossed that I'll get a job that will send me back and forth but I give that like a 10% chance. Basically like Monica giving me 90% success rate. :D

AnnabellaRenee87
Jul 6, 2014, 10:12 AM
Just to inject here real quick, you can use a Raspberry Pi and leave it at their house it would consume less than 500MW of power and they could just hide it out of site.
You can then use it as a Proxy/VPN/whatever you want server that you connect to from the US or wherever you're from.

gaijin_punch
Jul 6, 2014, 10:15 AM
Okay, so, let's just pretend I know what a Raspbery Pi is by name only: can you provide a link to what I'm looking at to get? I'm not a dinosaur but I'm getting there. ;) The target (I'm sure he's reading this, btw) is more of a young whipper snapper though so maybe I just have him buy it and I send him a bottle of whiskey in exchange.

That being said, I did hook up an Arduiino and some LEDs to my bicycle frame, so I'm not a total lost cause.

AnnabellaRenee87
Jul 6, 2014, 10:37 AM
Its a $35 credit card sized computer.
http://www.newark.com/raspberry-pi/raspbrry-modb-512m/model-b-assembled-board-only/dp/43W5302
Just search around and you will find guides to what you want to do :)
Actually I wish I knew someone in Japan right now I have a Raspberry Pi in a box with nothing to do and this would be a perfect thing to do with it.

AnnabellaRenee87
Jul 6, 2014, 11:40 AM
Also mentioning this as electricity is expensive as hell in Japan.

Husq
Jul 6, 2014, 12:12 PM
If your router support 3rd party firmware, like openwrt, ddwrt or tomato, you might be able to run openvpn or a ssh server directly on it. A lot of people use this method to connect their phone to the web, when using free/public wifi hotspots. Just google around and you will find a lot of guides and tutorials on it.

gaijin_punch
Jul 8, 2014, 10:15 PM
Also mentioning this as electricity is expensive as hell in Japan.

It's not if you just suffer through the brutal summer months (and not brutal but shitty in the winter with Japan's paper-thin walls) and don't use AC. :-o

I can't believe I'm saying this, but I think I am ready to repatriate. America's got some serious fucking issues, but seeing my breath in my house in the morning is not one of them.


Raspberry Pi

What would one case that with? Or... would one need to?


If your router support 3rd party firmware, like openwrt, ddwrt or tomato,

Japanese routers are turds. If you want something half-decent you have to order from the US.

Husq
Jul 8, 2014, 10:35 PM
Japanese routers are turds. If you want something half-decent you have to order from the US.

Buffalo routers are pretty decent and offer really good value for money, they might not be as cutting edge as other manufacturers, but they are reliable. Most of the buffalo router models support ddwrt or even have it preinstalled by default.

AnnabellaRenee87
Jul 8, 2014, 10:45 PM
Some Buffalo routers natively support DD-WRT.

You can get a case blue a raspberry pi case on the site I linked you, some people use legoes.

gaijin_punch
Jul 8, 2014, 11:44 PM
I think that's a new feature then. I remember needing VPN access when the Japanese law changed some 18 months ago and I was up the creek w/ no boat, so ordered from abroad.


some people use legoes.

Damn... if I only I had time. :D

Chik'Tikka
Jul 9, 2014, 03:14 AM
I

I can't believe I'm saying this, but I think I am ready to repatriate. America's got some serious fucking issues, but seeing my breath in my house in the morning is not one of them.




come live a winter in WI with me+^_^+ i had sets of blankets over all the doors and multiple space heaters (running up $600 'lectric in 3 months) and you could still see your breath (and i never new car batteries could actually freeze solid)+^_^+ been a real nice summer tho... real nice+^_^+

gaijin_punch
Jul 9, 2014, 03:22 AM
Last winter was inhuman for you guys -- I remember that. Japan's was mild (except for about 30 days). Those 30 days suck though. Thin walls (eg earthquake proof) which have literally zero insulation in them. Thing is, it's like that every winter. And Japan in general thinks it's efficient. :-/

Chik'Tikka
Jul 9, 2014, 03:39 AM
Last winter was inhuman for you guys -- I remember that. Japan's was mild (except for about 30 days). Those 30 days suck though. Thin walls (eg earthquake proof) which have literally zero insulation in them. Thing is, it's like that every winter. And Japan in general thinks it's efficient. :-/

lol, more like cheap most likely, there are earthquake zones in the US and earthquake resistant houses in the pacific northwest that also have decent insulation+^_^+ only reason they have either is because of lawsuit crazed Americans+^_^+

nanamin
Jul 9, 2014, 05:03 AM
Well if I'd add a line to the insulation talk, I'm in Sweden, and the walls are insanely thick. Do I like it in the winter, YES. Do I like it in the summer NO.

It's only 16 degrees outside, and guess how hot it is inside? 30 degrees... On top of that there are no such things as AC in Sweden unless you work for the best companies.

I think it's all a matter of choice and how rich you are. Heck if you have the money you can get thick walls in Japan too. If you go up to Hokkaido they have double layered windows in a lot of the houses despite being warmer than Sweden.

It all comes down to: The grass is always greener on the other side.
There is no perfect place, that's why I play PSO2 :3