How to install and configure OpenVPN?
-
@Djalma-Ribeiro Looks like the permissions got lost somewhere along the way, you can use
chmod +x update-sdk.sh
to make it executable, then try again -
@tom you are the best! thanks
-
Well, I managed to update, redid the settings and he is connected to the internet. But I still can't connect the QGC.
I didn't understand one thing. Why the drone and the pc are online in the "Connectors" of "Networks" but both can't find each other by ping?
You can only ping if one of them is a Host Connector and the other is a Networks Connector.
I believe it is not Firewall because I have already disabled it.
Any idea?
-
@Djalma-Ribeiro I have no experience with having an OpenVPN online account and hosting through there so I can't provide any info on any of those settings. We host our own VPN servers using Google Cloud. That doesn't mean you can't do what you're doing, I just have no experience in that area.
You might get better answers to those questions on the OpenVPN forum (https://forums.openvpn.net/)
It's possible you have to configure the server's firewall as well to allow traffic on the ports that PX4 uses but that's just a guess
-
@tom Is there an easier way to connect the QGC to the drone? Even if on each connection I need to manually inform the ips.
I need to make the drone connect via LTE/5G urgently.
-
@Djalma-Ribeiro We usually recommend just connecting over WiFi before jumping into cellular + VPN. Have you done that yet to familiarize yourself with the process of connecting to QGC?
-
@tom wifi yes
-
@Djalma-Ribeiro As long as you have your VPN set up correctly it should be the exact same idea. The only change is that you will have to specify the IP of your ground station in the qgc-ip file. I can't help too much with the OpenVPN side of things other than what is in our docs.
-
@tom how do i update openvpn in drone?
-
@Djalma-Ribeiro RB5 is running Ubuntu 18.04, so any installation / updating instructions for Ubuntu 18 should also be applicable to RB5
-
I was able to configure the VPN using this video: https://www.youtube.com/watch?v=IsyNtovozVU
How do I make the drone auto-initialize the vpn?
-
@Djalma-Ribeiro You can create a systemd service file and enable it to run on boot and have it execute the OpenVPN connection command.
Here is an example on how we have used it in the past on a VOXL:
[Unit] After=voxl-time-sync.service Requires=voxl-time-sync.service [Service] Type=forking ExecStartPre=/bin/sleep 2 ExecStart=/usr/sbin/openvpn --script-security 2 --daemon --config /etc/openvpn/KEY_FILE [Install] WantedBy=default.target
Won't be exactly the same as above but that's the general idea.