Page 1 of 1

Multiplayer with VPN not working

Posted: 01 Mar 2020 21:31
by danielleedawson
I am trying to play openttd multiplayer with my son who is 100 miles away. I thought it would be simple for us both to use a VPN so we both appear to be on the same LAN. But what happens is, he can see my server on the list (in non-advertised mode) but the join button does not work. We tried Hamachi as well with simulate behaviour. Does anyone know what we can do about this? Thanks

Re: Multiplayer with VPN not working

Posted: 02 Mar 2020 09:40
by planetmaker
You need to use the same version of OpenTTD. If that's the case, then the answer very likely is: configure your routers and your VPN correctly. Notably it means that the server's router has to have port-forwarding enabled for the ports needed by OpenTTD for TCP and UDP and the PC's firewall (if any) has to allow incoming connections to those ports.
the default port is 3979, but you can change it to anything you like when you start a server. If you set up your own server behind a router, you need to forward both TCP and UDP on that port.
Communication with the master-server works via port 3979 over UDP (inbound + outbound) and 3978 over UDP (outbound)

Re: Multiplayer with VPN not working

Posted: 04 Mar 2020 20:57
by danielleedawson
Thank you for your reply.
I hope this isn't a silly question, but doesn't using a VPN avoid the need for any port-forwarding?
Thanks

Re: Multiplayer with VPN not working

Posted: 05 Mar 2020 07:46
by jfs
Yes using VPN should mean you shouldn't need to forward any ports. You still need to check any firewall/security suite software installed on your PCs if they potentially block the connections.

Re: Multiplayer with VPN not working

Posted: 05 Mar 2020 23:50
by rowdog
I suspect that the master server is showing your router's external ip address rather than the ip address your server uses with the VPN. If that's the case, you can tell your son your server's address in VPN and he should be able to connect to that by using the -n command line option.