#1 2019-11-05 08:33:02

milkboy
Trusted Member
Registered: 2019-11-05
Posts: 6

SSH Tunneling on MrVM NAT VPS

So, Just bought MRVM nat VPS.
This is my first nat vps, so please be kind. big_smile

So as a first thing i test, is IPv4 SSH functionality, as i want to learn the limitation of NAT VPS networking
SSH, SFTP, Dynamic tunneling works as expected.

Whats not working is, ssh -R tunelling.

I got port 1xx00 -1xx21 from MrVM.
I tried reverse tunelling my

On my home server wrote:

[email protected]:~$ ssh -fN -R 1xx01:localhost:22 [email protected] -p 1xx21

On MrVM wrote:

[email protected]:~$ sudo netstat -nap | grep 1xx01
tcp        0      0 127.0.0.1:1xx01         0.0.0.0:*               LISTEN      545/sshd: user
tcp6       0      0 ::1:1xx01               :::*                    LISTEN      545/sshd: user

but i get connection refused when i try ssh to [email protected]:1xx01

so 1st question, is -R tunneling possible on IPv4?
2nd, if yes, what to do for it to be accessible?
If not, moving on to testing other stuff. smile

Last edited by milkboy (2019-11-05 08:52:04)

Offline

#2 2019-11-05 21:12:04

mikho
Low End Mod
From: Hell and gore == Sweden
Registered: 2013-03-02
Posts: 1,833
Website

Re: SSH Tunneling on MrVM NAT VPS

the external port 1xxx21 is forwarded to your internal port 22.
So leave the sshd config as default and it will work as intended.

Offline

#3 2019-11-06 09:04:15

milkboy
Trusted Member
Registered: 2019-11-05
Posts: 6

Re: SSH Tunneling on MrVM NAT VPS

That's not what i meant.

What i wanna do is reverse tunnel my home SSH server to MrVM ser @ port external port 1xx01.

Is that possible on IPv4?

Offline

#4 2019-11-06 20:13:27

skorous
Trusted Member
Registered: 2019-03-21
Posts: 41

Re: SSH Tunneling on MrVM NAT VPS

I'm not understanding. 1xx21 is already forwarded to port 22 on your local box, why would you move it to 1xx01? In my defense, I don't do a lot of reverse tunneling so it might be obvious....

Offline

#5 2019-11-07 03:02:50

milkboy
Trusted Member
Registered: 2019-11-05
Posts: 6

Re: SSH Tunneling on MrVM NAT VPS

Okay then let me change the scenario abit.

I have a RPi with telnet port 23 at home which i cant access from outside my home network.
I want to use ssh tunneling so that i can access my telnet server from NAT VPS 1xx01.

Usually on a regular vps i just do this on the RPi

from home: ~$ ssh -fN -R 1xx01:localhost:23  [email protected] -p 1xx21

can it be done on nat vps?

Offline

#6 2019-11-07 09:13:48

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 4,100
Website

Re: SSH Tunneling on MrVM NAT VPS

yes it can.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#7 2019-11-08 02:54:11

milkboy
Trusted Member
Registered: 2019-11-05
Posts: 6

Re: SSH Tunneling on MrVM NAT VPS

Yeah. I still get connection refused, when i try to telnet to MrvmExternalIP at port 1xx01.

from RPi: ~$ ssh -fN -R 1xx01:localhost:23  [email protected] -p 1xx21

from Laptop: ~$ telnet MrvmExternalIP 1xx01

i must be doing something wrong.

Offline

#8 2019-11-08 05:46:41

mikho
Low End Mod
From: Hell and gore == Sweden
Registered: 2013-03-02
Posts: 1,833
Website

Re: SSH Tunneling on MrVM NAT VPS

Can you connect to that port from the vm itself?
Using both ssh localhost -p 1xx01
And using the IP 172.16.xx.yy -p 1xx01 ?

Offline

#9 2019-11-11 06:04:26

milkboy
Trusted Member
Registered: 2019-11-05
Posts: 6

Re: SSH Tunneling on MrVM NAT VPS

mikho wrote:

Can you connect to that port from the vm itself?
Using both ssh localhost -p 1xx01
And using the IP 172.16.xx.yy -p 1xx01 ?

From MrVM terminal
Localhost -p 1xx01= ssh/telnet GOOD
172.16.xx.yy -p 1xx01 = ssh: connect to host 172.16.xx.yy port 1xx01: Connection refused

so i tried assigned, random and some common ports. then nmap it.
result nmap localhost, all -R forwarded ports opened.

nmap 172.16.xx.yy -p 1xx01 #and other ports too.
All closed.

I haven't touch iptables config.
"iptables -S" shows no rules at all

Offline

Board footer

Powered by FluxBB