Howdy, Stranger!

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


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
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.

SSH port forwarding with multiple remote IPs

0xdragon0xdragon Member
edited October 2013 in Help

Okay, here's my question.

I have three Raspberry Pi's (basically mini LEBs) hosted in my cupboard. I have a VPS with Crissic Solutions with three IPv4 IPs.

For example, for SSH, what I want happening is the following:

Raspberry Pi No.1 SSH (192.168.1.17:22) -> xx.xxx.xxx.01:22
Raspberry Pi No.2 SSH (192.168.1.18:22) -> xx.xxx.xxx.02:22
Raspberry Pi No.3 SSH (192.168.1.19:22) -> xx.xxx.xxx.03:22

I only want each local RasPi to be reachable on one IP of the remote VPS.

Anyone know how to or tried this? I've already exhausted my Google-fu.

Thanks!

Comments

  • Sounds like you need a VPN

  • 0xdragon0xdragon Member
    edited October 2013

    @Spencer said:
    Sounds like you need a VPN

    What sort of VPN? How would you recommend that I assign different users different IPs?

  • setup 3 instances of openvpn on crisis solution, and each rasp connect to each of the openvpn

  • @cosmicgate said:
    setup 3 instances of openvpn on crisis solution, and each rasp connect to each of the openvpn

    Great idea! I'll try doing that and post back here if I have any further questions or tips for others attempting to do the same thing.

  • @CastleServers said: Great idea! I'll try doing that and post back here if I have any further questions or tips for others attempting to do the same thing.

    Interested in the same. How did this go? Any follow up tips...? ;)

  • You can put each ssh on a different port and then use port forwarding...

  • I use this:
    http://duncanthrax.net/pbnc/

    It's awesome. Tell it which local IP# and what IP/PORT to send it to. I use this to setup my CDN stuff.

  • AnthonySmithAnthonySmith Member, Host Rep

    Pi no.1

    iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination xx.xxx.xxx.01:22
    

    Pi no.2

    iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination xx.xxx.xxx.02:22
    

    Pi no.3

    iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination xx.xxx.xxx.03:22
    

    Not sure why a simple DNAT rule in prerouting would not work for this?

Sign In or Register to comment.