ROS over VPN, communicate on different subnet
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?
This should be no different from how you'd setup a regular multi-host ROS network.
we cannot answer that, as it would depend entirely on how the VPN server is configured (and the machine/appliance that runs the server).
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?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.
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).OP writes:
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.
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