How to connect a Raspberry to a QIoT through WAN?

QIoT technology to allow you to explore potential IoT business opportunities.
Smart home/Smart building/Smart City/
Post Reply
Pasto69
New here
Posts: 3
Joined: Thu May 16, 2019 3:31 am

How to connect a Raspberry to a QIoT through WAN?

Post by Pasto69 » Thu May 16, 2019 3:42 am

Hi,
I need to connect some raspberry to my container on my NAS, i follow The tutorials and i connect a raspy easily...
But i need to connect it outside my LAN, through an internet connection, how i can archieve it?

Thanks

dolbyman
Guru
Posts: 14838
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to connect a Raspberry to a QIoT through WAN?

Post by dolbyman » Thu May 16, 2019 3:51 am

either a vpn from raspi LAN to NAS LAN

or port forward your NAS container ports

Pasto69
New here
Posts: 3
Joined: Thu May 16, 2019 3:31 am

Re: How to connect a Raspberry to a QIoT through WAN?

Post by Pasto69 » Thu May 16, 2019 3:59 am

Thanks @dolbyman

Mmm... a VPN is a nice idea... I have tuo use a GPS+GPRS shield but OpenVPN Should be' easy to install...

Without a VPN where i have to put the External IP:port of my NAS in the raspy?

dolbyman
Guru
Posts: 14838
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to connect a Raspberry to a QIoT through WAN?

Post by dolbyman » Thu May 16, 2019 4:25 am

GPRS so we are dealing with 2G cell data connections here ?

without a VPN it would the the external IP of your (I guess) router+port forwarded to the NAS

User avatar
OneCD
Ask me anything
Posts: 6398
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to connect a Raspberry to a QIoT through WAN?

Post by OneCD » Thu May 16, 2019 4:30 am

Not sure what it’s like in other countries but here in Australia, cell-tower routers are assigned dynamic IP addresses - depending on the provider.

production NAS: TS-569 Pro with Debian 9.9 'Stretch' (power on/off times are < 1 minute)
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20190921

one.cd.only@gmail.com

Image Image Image Image

dolbyman
Guru
Posts: 14838
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to connect a Raspberry to a QIoT through WAN?

Post by dolbyman » Thu May 16, 2019 4:37 am

I think the IP should stay intact across cell handovers (if the device is even moving.. OP never stated)

the NAS is (I guess) stationary with either a fixed IP or DDNS in place

User avatar
OneCD
Ask me anything
Posts: 6398
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to connect a Raspberry to a QIoT through WAN?

Post by OneCD » Thu May 16, 2019 4:42 am

Same here. The problem is really only those portable routers/APs that go to sleep after 10 minutes of inactivity. When they wake-up, they can be assigned a different IP address. Using DDNS helps, of course. ;)

production NAS: TS-569 Pro with Debian 9.9 'Stretch' (power on/off times are < 1 minute)
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20190921

one.cd.only@gmail.com

Image Image Image Image

Pasto69
New here
Posts: 3
Joined: Thu May 16, 2019 3:31 am

Re: How to connect a Raspberry to a QIoT through WAN?

Post by Pasto69 » Fri May 17, 2019 12:11 am

Yes, the router/NAS have the fixed IP, the "other" raspberry use cellular connection...

What I don't understand is how to match the IPs, that is, following the wizard I configure the raspberry with the local ip, then when I take it "out" from the LAN I have to indicate to the raspberry the IP of my NAS and the port to enter...
On the NAS side should the IP of the raspy be configured or does it automatically acquire it with the incoming connection?

i'm a noob :S

dolbyman
Guru
Posts: 14838
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to connect a Raspberry to a QIoT through WAN?

Post by dolbyman » Fri May 17, 2019 12:23 am

as you use the TUN interface of the OpenVPN connection as your gateway/route, the NAS IP that the RasPI talks to, can stay the same no matter if local connection or VPN connection

Post Reply

Return to “QIoT”