A Forum run by Enthusiasts of MidNite Solar

The Open Source software/hardware corner => General info => Topic started by: Graham on January 20, 2017, 12:34:58 PM

Title: Accessing the classic from anywhere without port forwarding
Post by: Graham on January 20, 2017, 12:34:58 PM
Came across this site https://developer.weaved.com/portal/ (https://developer.weaved.com/portal/) that  permits the access of IOT devices behind a firewall, it requires an agent running on the local network to be setup to the weaved account.

It's likely using something similar to SSH reverse port forwarding as explained here http://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work (http://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work)

I setup my raspberryPi with the agent and modified their  /etc/config/weaved/services/*.conf file to forward to my classic
proxy_dest_port 502
proxy_dest_ip 192.168.0.22

Then, on the weaved dashboard I got the proxyIp and port, entered that into the local app or android app and connect.
Unfortunately, with a free account, the proxy is only valid for half an hour so you have to get a proxy address/port each time you want to connect remotely

Title: Re: Accessing the classic from anywhere without port forwarding
Post by: TomW on January 20, 2017, 12:45:00 PM
Graham;

That seems much more sane / safe than blowing a hole through your router.

Thanks for the share!

Tom
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: TomW on January 20, 2017, 12:51:23 PM
Seems to be available as a Debian package, too.

"weavedconnectd - Simplifies remote connections to computers behind NAT firewalls"

At least on my Debian 7.11 systems  on my rPi machines.

Not there in Jessie/Sid on the Cubie boards.

Tom
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: Graham on January 20, 2017, 02:10:42 PM
Midnite Solar should embed this type of agent in their new comms box and host the proxy at mymidnite.


Graham.
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: Graham on January 21, 2017, 09:24:35 AM
Quote from: TomW on January 20, 2017, 12:45:00 PM
Graham;

That seems much more sane / safe than blowing a hole through your router.

Thanks for the share!

Tom

Plus you don't have to pay for a dyndns service


Graham.
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: grgdgreek on January 22, 2017, 02:24:33 AM
Quote from: Graham on January 21, 2017, 09:24:35 AM
Quote from: TomW on January 20, 2017, 12:45:00 PM
Graham;

That seems much more sane / safe than blowing a hole through your router.

Thanks for the share!

Tom

Plus you don't have to pay for a dyndns service


I would also like that :-)
George :-)


Graham.
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: cjbamenda on March 12, 2024, 09:09:40 AM
Graham:

I read your post from long ago with interest. I also discovered that Weaved is now owned by Remote.It which I have installed and use on a RPi400 connected to my LAN. I can't figure out how to make this approach you described work with Remote.It. Any ideas or is this too far in the past?
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: boB on March 12, 2024, 04:29:12 PM

Will look at this !

Thanks
Title: Re: Accessing the classic from anywhere without port forwarding
Post by: Graham on March 13, 2024, 04:31:57 PM
It's been a while, I don't remember how I set that up, I have another look at it and see if I can figure it out.

You might be able to use cloudflare, here is a link to a video (https://www.youtube.com/watch?v=KzpCWbS2l4Q) or this video if you're using HomeAssistant (https://www.youtube.com/watch?v=xXAwT9N-7Hw&t=273s)
You can use Freenom (https://www.freenom.com/en/index.html?lang=en) for the domain name

You could also setup a vpn with wireguard running in a docker container, you can use IOTStack on a RP4 IOTstack/Containers/WireGuard/ (https://sensorsiot.github.io/IOTstack/Containers/WireGuard/)

I'm currently playing around with the OPNSense (https://opnsense.org/) router running on a Zimaboard (https://shop.zimaboard.com/products/zimaboard-single-board-server) with the Wireguard plug-in so I can access my local network remotely...