Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Question about NAT VPS and SSH tunneling
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Question about NAT VPS and SSH tunneling

RE:SSH tunneling

I'm sure this is a dumb question, but with regular VPS,

ssh -D 5151 [email protected]

to set up a SSH tunnel.

Is this doable with NAT?

Thanked by 1creep

Comments

  • creepcreep Member

    yes

  • Yes it is, except you need -p argument as well.

    For instance ssh -Dp 12345 user@remote-ip. the -p is the port number ssh is listening on. You will need to change this in /etc/ssh/ssh_config using the console and an editor.

  • ma2tma2t Member

    "-D" isn't for SOCKS proxy?

    If you want to use your VPS as a VPN through SSH, you can give a look at sshuttle:
    https://github.com/sshuttle/sshuttle

  • williewillie Member

    Yes you can use SOCKS, ssh port forwarding, or set up a tcp through ssh tunnel, but the last in particular is a hacky substitute for a normal vpn. The current trendy thing is wireguard, I believe.

  • @willie said:
    Yes you can use SOCKS, ssh port forwarding, or set up a tcp through ssh tunnel, but the last in particular is a hacky substitute for a normal vpn. The current trendy thing is wireguard, I believe.

    Yeah it is wireguard, I am not sure why since my openvpn works fine. I am always behind it seems and that's why I stay in my cave.

  • jackbjackb Member, Host Rep
    edited July 2019

    @AuroraZ said:
    Yeah it is wireguard, I am not sure why since my openvpn works fine. I am always behind it seems and that's why I stay in my cave.

    It's faster and has a more sane setup. Also handles connection drops far better.

  • @jackb said:

    @AuroraZ said:
    Yeah it is wireguard, I am not sure why since my openvpn works fine. I am always behind it seems and that's why I stay in my cave.

    It's faster and has a more sane setup. Also handles connection drops far better.

    Never had a problem with any of that. So I guess I am lucky.

    Thanked by 1sidewinder
  • omelasomelas Member

    @jackb said:

    @AuroraZ said:
    Yeah it is wireguard, I am not sure why since my openvpn works fine. I am always behind it seems and that's why I stay in my cave.

    It's faster and has a more sane setup. Also handles connection drops far better.

    Unless it's not stuck in openvz. I never heard KVM NAT VPS for a while. Or is it changed in OpenVZ 7?

  • awesome - this is needed bc the NAT VPS is always going to have ssh on a non-standard port?

    @AuroraZ said:
    Yes it is, except you need -p argument as well.

    For instance ssh -Dp 12345 user@remote-ip. the -p is the port number ssh is listening on. You will need to change this in /etc/ssh/ssh_config using the console and an editor.

  • williewillie Member

    Yes, you can also put the port number in your .ssh/config file so you don't have to put it on the command line.

  • @willie said:
    Yes, you can also put the port number in your .ssh/config file so you don't have to put it on the command line.

    Yeah you can, but make sure that you do it for only the nat vps and not globally. That will give you a head ache if you forget that you did it and can't ssh to any other box.

Sign In or Register to comment.