Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh tunnel questions....
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
SarahS93
Guru
Guru


Joined: 21 Nov 2013
Posts: 478

PostPosted: Thu Jul 20, 2017 8:30 pm    Post subject: ssh tunnel questions.... Reply with quote

torify ssh -p 80 user@ipfrommydslrouter
the router at home route this to my server
my server route this to a vm
so can i connect with my notebook from a free wifi into my vm at my home server
from the vm-guest i can connect to my vm-host with ssh
that works for me fine

how can i tunnel by this way a connection with spice to my server?
( torify --> ssh-tunnel --> mydslrouter --> vm-host -> vm-guest -> vm-host:spiceport )

if i use this way with a tunnel, can i connect with ssh at the same too?

what ssh command do i have to type on what machine?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14159

PostPosted: Fri Jul 21, 2017 1:36 am    Post subject: Reply with quote

Why do you want to tunnel the connection from host -> guest -> host? Why not just connect directly to the host?

You can connect with ssh if the right machines forward the traffic in the right order. It looks like all you would need is to make the vm-host not tunnel the ssh connection to the vm-guest, but instead accept it locally.
Back to top
View user's profile Send private message
SarahS93
Guru
Guru


Joined: 21 Nov 2013
Posts: 478

PostPosted: Fri Jul 21, 2017 4:22 am    Post subject: Reply with quote

i do not open any port on my server directly to the internet, thats why i go to a vm first.

how do i do the traffic forward with a ssh tunnel?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1762

PostPosted: Fri Jul 21, 2017 6:10 pm    Post subject: Reply with quote

SSH supports port forwarding. You can get started with 3 simple steps:
1) Allow incoming connections from your guest to vm-host
2) Connect to your VM with ssh -L <some random port>:<IP of your VM host>:<port at your VM host>
3) Run spice against localhost:<some random port>

Obviously, that random port has to match in both commands. SSH has a pretty good manual too, and it allows for quite a lot of tricks. Don't be shy about reading it :D
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