Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH tunnel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kermitthefrog917
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2005
Posts: 106

PostPosted: Thu Nov 16, 2006 10:18 am    Post subject: SSH tunnel Reply with quote

I have my computer in my dorm room at school, and I can ssh into my sisters computer at home. How can I establish a constant connection between the two? I am looking for a ssh method, and currently this is what I was able to come up with.

Code:

ssh -f -w 0:any foo.bar true


Then messing around with the tunl0 settings on both boxes...

result: doesnt work...

does anyone have any good ideas?
Back to top
View user's profile Send private message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Thu Nov 16, 2006 11:28 am    Post subject: Reply with quote

what kind of constant connection do you mean?

You can make ssh tunnels for different services (e.g. web) with
Code:

ssh -L 10080:localhost:80 user@sister.com

Now if you connect to port 10080 on your host you are actually connecting to the localhost at sister.com on port 80 through the tunnel

If you want to mount remote directories through ssh (you might see it as "persistent sftp"), use fuse (kernel module) and sshfs.

If you want a more "overall" connection, you may want too look into VPN (read about it first, there are different solutions)
_________________
Cheers 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
kermitthefrog917
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2005
Posts: 106

PostPosted: Thu Nov 16, 2006 4:31 pm    Post subject: Reply with quote

I want more of a VPN, and I looked around, and I saw a VPN solution using only SSH and the command I posted above.

any recommendations of a VPN setup?
Back to top
View user's profile Send private message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Thu Nov 16, 2006 8:09 pm    Post subject: Reply with quote

oh, sounds interesting that this simple command could offer VPN like features... Never seen that before, I might look into it.
However, for proven solutions, here's a few keywords:

  • cipe (I remember being able to run windows shares etc. over it some 10 years ago)
  • tinc
  • IPSec
  • FreeS/WAN


The last 3 are full blown VPN solutions, although tinc seems quite easy to install. I have no 1st hand VPN experience however.
_________________
Cheers 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
madisonicus
Veteran
Veteran


Joined: 20 Sep 2006
Posts: 1130

PostPosted: Thu Nov 16, 2006 8:18 pm    Post subject: Reply with quote

OpenVPN is another option for you. Easier to set up securely than IPSEC.

Gentoo-wiki howto: http://gentoo-wiki.com/HOWTO_OpenVPN_primer

-m
_________________
Please add [SOLVED] to your message title if you feel that your question has been answered.
------
Intel Q9300 Core2 Quad * Gigabyte GA-EP35C-DS3R
Samsung x360
AMD64 x2 4200+ * TF7050-M2 * HTPC
ZOTAC ION A-U Mini-ITX * HTPC
Back to top
View user's profile Send private message
kermitthefrog917
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2005
Posts: 106

PostPosted: Fri Nov 17, 2006 2:50 am    Post subject: Reply with quote

ok... i used openvpn... i set up a tunnel between the two computers... now how do access the rest of my home network from my dorm room?

iptables MASQUERADE?

route?

thanks for the help
Back to top
View user's profile Send private message
monkeyboy1976
n00b
n00b


Joined: 14 Jun 2006
Posts: 9
Location: Switzerland

PostPosted: Fri Nov 17, 2006 7:59 am    Post subject: Reply with quote

Hi,

I am trying this at the moment too, getting my office computer to join my home network. I bought the book Building Linux Virtual Private Networks (VPNs) which has a number of solutions. I've opted to try the PPP over an SSH tunnel. Sounded a good approach to me. Check out the books website wher e they have a sample chapter and a number of scripts that you can use.

Cheers
IV
Back to top
View user's profile Send private message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Fri Nov 17, 2006 8:19 am    Post subject: Reply with quote

@kermit:

maybe you actually need to read some documentation :?:
It seems the routing between local networks and VPN is explained in good detail in
http://gentoo-wiki.com/HOWTO_OpenVPN_primer#Configuration

Good luck
_________________
Cheers 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum