Shared external IP address

2

So Here is my set-up: I have a raspberry pi behind a router. I set a static internal IP address for the pi. I configured the SSH config files and everything how I like it so far. I have a contab running every 2 minutes that will email me if the external IP address changes. I then did port forwarding on my personal router so if I SSH to the router, it will forward it do the raspberry pi. (It all works great inside the network.

I have a few problems though. I live at an apartment complex where we share an external IP address with 4 other rooms. So when I try SSHing from the outside world through my router, it doesn't know where to go because we have a shared IP address. I have no idea how to deal with this exact situation.

Currently I am using weaved so SSH into my raspberry pi (I think it's like a reverse SSH tunnel thing?) but my account only allows for 30 minute sessions so I have to TMUX or SCREEN every time I login which isn't terrible.

I just want to know if there is a way to do it with a shared IP address at an apartment complex. Thanks so much!

Matt

Posted 2015-07-22T15:55:02.933

Reputation: 31

Answers

1

I finally realized what happened. So the setup at my apartment setup goes from my raspberry pi -> my router -> apartment's own router/switch -> internet. So I figured out I wasn't able to port forward incoming traffic because the incoming traffic first hits my apartment's personal router/switch before it hits my own router! I have no access to this so I have started using ngrok and it works fantastic. It makes a reversed ssh tunnel so I can always ssh to my raspberry pi from the outside world. If I had access to the apartment's routing system then I would be able to set up port forwarding.

Matt

Posted 2015-07-22T15:55:02.933

Reputation: 31

1

To answer this question

So when I try SSHing from the outside world through my router, it doesn't know where to go because we have a shared IP address. I have no idea how to deal with this exact situation.

You need to assign a specific port on your shared IP address to port-forward to your Raspberry Pi's port 22. How you do this depends on your router/firewall. But then you can ssh sha.red.ip.addr 8022 and have the firewall redirect you to your Pi's 22.

hymie

Posted 2015-07-22T15:55:02.933

Reputation: 1 011