0

I wanna access my Raspberry Pi from outside my home network. I'd like to do it securely.
My setup is:

soyealink 4g+ b353 (router with simcard) --- Raspberry Pi

And I wanna be able to access it from a Windows 10 computer - I don't have a static IP from my ISP, but I don't mind updating a IP once in a while, it's rarely changed anyhow.

I've tried to find portforwarding config in the router but it doesen't seem to support it, its different than usual router since its a 4G modem as I understand. I also looked up to see if port 22 is open on these sites:

https://canyouseeme.org/
https://www.yougetsignal.com/tools/open-ports/

Which it's apparently it's not.

I've come around some ways using teamviewer or VNC but I just wanna access the cli and I don't like either.

So my question is:
How can I connect to the RPi from outside my home network?

  • Can I make a VPN through to the RPi - if so how?
  • Or maybe have some service I can connect my RPi to and then via that service reach the RPi
  • Or can I reverse proxy in to it?

Or is there smarter ways of doing it I don't yet know about?

2 Answers 2

2

I've tried to find portforwarding config in the router but it doesen't seem to support it, its different than usual router since its a 4G modem as I understand

Not because it's a 4G modem, but because 4G network operators often don't support the ability to connect in – that is, they often use CGNAT and don't actually give you a "public" IPv4 address directly at all. Without a public IP address (usually because the operator's infrastructure is designed for mobile phones and transient connections), there is no point in setting up port-forward rules because the packets won't even reach your router in the first place.

So although the B353 certainly has the feature in general, it would not surprise me if your operator hid the menu option in their custom-branded firmware because it wouldn't work with their service either way.

Can I make a VPN through to the RPi - if so how?

Make a VPN connection from the RPi. As long as that VPN connection is active, it'll carry packets and connections in both directions – not just from the RPi to the VPN server, but also from (or through) the VPN server to the RPi.

(The actual VPN type matters very little – it could be OpenVPN or WireGuard or whatever – although you may need to set up the client to send periodic keep-alive packets whenever it goes idle.)

Practically all methods for making such hosts accessible remotely, e.g. tools such as ngrok or TeamViewer, also work this way – they open an outbound connection that sits there waiting for requests from outside.

3
  • Alright thanks. It seems ngrok is quite easy to setup and use I'll give it a shot. Then i hopefully get around the port forward thing - been spending a good deal of time to not get it to work :)
    – Rune Trold
    Commented May 4, 2023 at 15:33
  • @RuneTrold: I would actually recommend Tailscale or ZeroTier instead; I think Ngrok only has HTTP on the free plan? A VPN-type tool would let you connect any kind of app. Commented May 4, 2023 at 16:08
  • Alright I've been having fun with tailscale - it works perfect for me! thank alot :)
    – Rune Trold
    Commented May 22, 2023 at 17:52
1

As far as I can find, the b353 can do port-forwarding, just calls it by a very non-standard name of "Virtual Server".

You should find that in the "Security" section.

Click the "+" button to add your forward, enter the values in the fields and click Save.

I have taken this information from the video How To Port Forward The HUAWEI B525 LTE Router, which is not the same as your model, so I hope that the interface to your router is about the same.

enter image description here

6
  • Hi thanks @harrymc, Yes it does have the virtual server I'd never guessed that it would be the name. It's just straight forward to use set up to ssh right? WAN and LAN as: 22 - 22 and just TCP as protocol if I got it right?
    – Rune Trold
    Commented May 2, 2023 at 18:43
  • Yes, this seems correct, but I can't be sure. It can always be tweaked in case of mistake.
    – harrymc
    Commented May 2, 2023 at 18:46
  • I will, just gotta make sure it solved it :) I won't know until tomorrow though..
    – Rune Trold
    Commented May 2, 2023 at 18:47
  • I'm sure you will. Good luck.
    – harrymc
    Commented May 2, 2023 at 18:48
  • Hi, I've added the virtual server but apparently doesn't work like that with the sim card modem.
    – Rune Trold
    Commented May 4, 2023 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .