ROS over VPN, communicate on different subnet

asked 2019-05-29 07:09:17 -0500

agurman gravatar image

Hey guys,

Brief of my current setup, I have access to a VPN network using an openVPN file, this vpn is setup in 'road-warrior' mode, so when i connect to this vpn am given an ip on the same subnet as the server. The server than has a number of LAN computers connected to it over ethernet on a different subnet. I am able to ssh in one of these machines through the VPN, what i am trying to achieve however is communicating with that computer with ROS.

Basically i am trying to setup the VM i own on the remote computer attached to the VPN server as the ROS Master, and connect my own laptop to it from over the internet. I understand that using a VPN i should be able to do this given the computers are on the same subnet and are all able to access each other on any ports (Basic ROS assumption) However i am not sure on how to connect to the remote computers attached to the VPN on a different subnet. I am assuming there is some firewall between the remote computers and the VPN server blocking the ports required by ROS?

Is there any easy way to achieve what i am trying to do?

edit retag flag offensive close merge delete

Comments

1

However i am not sure on how to connect to the remote computers attached to the VPN on a different subnet.

This should be no different from how you'd setup a regular multi-host ROS network.

I am assuming there is some firewall between the remote computers and the VPN server blocking the ports required by ROS?

we cannot answer that, as it would depend entirely on how the VPN server is configured (and the machine/appliance that runs the server).

gvdhoorn gravatar imagegvdhoorn ( 2019-05-29 07:22:21 -0500 )edit

Since (as mentioned) the configuration of the VPN or firewalls in between might be blocking parts of the traffic, perhaps you'd have better luck using the rosbridge_suite to connect to it over websockets?

gonzalocasas gravatar imagegonzalocasas ( 2019-06-10 10:17:25 -0500 )edit

Wouldn't that still depend on whether the firewall OP mentions filters traffic on certain ports?

Websockets are nice, but they still require TCP and/or UDP ports to be reachable.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-11 02:21:50 -0500 )edit

Technically, yes, you're right. But since websockets usually works on TCP 80/443, it's less likely to be blocked by corporate firewall rules (That said, rosbridge_suite defaults to port 9090).

gonzalocasas gravatar imagegonzalocasas ( 2019-06-11 03:41:05 -0500 )edit

OP writes:

i am trying to setup the VM i own on the remote computer attached to the VPN server as the ROS Master, and connect my own laptop to it from over the internet.

this makes it sounds like the VM is behind the firewall (if there is any) and OP is trying to reach it from the "outside".

Firewalls typically don't block HTTP(S) ports, but then for outgoing traffic. The setup OP describes seems to be concerned with incoming traffic.

But without OP responding, all we can do is speculate.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-11 03:51:26 -0500 )edit

Thanks for all the useful comments guys. @gvdhoorn, you are correct, the VM is behind the firewall and i am trying to connect from "outside". The firewall seems to only allow ssh connections, however i did manage to get this working as suggested using rosbridge_suite my method is to use ssh and port forward a single port, in this case rosbridge default port 9090. I then start the rosbridge server on the VM, and then use a python based websocket client to communicate with the websocket server. this allows me to publish and subscribe to topics. Python based websocket client credits to: GigaFlopsis

agurman gravatar imageagurman ( 2019-07-23 22:18:11 -0500 )edit