Cast to chromecast devices on openvpnserver local lan

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
nicholasroenshof
OpenVpn Newbie
Posts: 4
Joined: Mon Feb 22, 2021 8:27 am

Cast to chromecast devices on openvpnserver local lan

Post by nicholasroenshof » Mon Feb 22, 2021 8:36 am

Hi, I have setup a private VPN ( OpenVPN )

The server is on: 192.168.1.3
OpenVPN server ip: 10.10.10.1

Client local lan: 192.168.253.131
Client OpenVPN ip: 10.10.10.6

The VPN is working, from the client I can ping and browse network on both 10.10.10.1 and 192.168.1.3, and the client has the WAN ip of the server.

I want to cast to my chromecast devices on server local lan, but from the client I cant see my chromecast devices 192.168.1.100, but im am able to ping the device ( Nvidia Shield TV )

Is this even possible to do ??

My server config:

ServerConfig

proto tcp4-server
dev tun
tls-server
tls-auth "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ta.key" 0
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ServerVPN.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ServerVPN.key"
dh "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\dh2048.pem"
server 10.10.10.0 255.255.255.0
client-to-client
keepalive 10 120
cipher AES-128-CBC
comp-lzo
persist-key
persist-tun
client-config-dir "C:\\Program Files\\OpenVPN\\config"
verb 3
route-delay 5
route-method exe
push "route 192.168.1.0 255.255.255.0"
route 192.168.253.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.1.1"


My Client config:

ClientConfig

remote MY SERVER WAN IP
client
port 1194
proto tcp4-client
dev tun
tls-client
tls-auth "C:\\Program Files\\OpenVPN\\config\\ta.key" 1
remote-cert-tls server
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450

ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\ClientVPN.crt"
key "C:\\Program Files\\OpenVPN\\config\\ClientVPN.key"

cipher AES-128-CBC
comp-lzo
persist-key
persist-tun
verb 3
mute 20

nicholasroenshof
OpenVpn Newbie
Posts: 4
Joined: Mon Feb 22, 2021 8:27 am

Re: Cast to chromecast devices on openvpnserver local lan

Post by nicholasroenshof » Tue Feb 23, 2021 12:16 pm

Just an update. I testet with catt ( https://github.com/skorokithakis/catt ) While scanning with this it also dosent see the Nvidia Shield Chromecast, BUT, with catt you can specify an ip to cast to, if you know the ip of the cast device. And that works !! So the possibility is there. But I still need Google Chrome to be able to see the device, to cast my webcam. Any hint ? or anyone knows an app that can cast my whole desktop ( catt is not able to do this ) I think the problem why my VPN client is unable to see the cast device is because the VPN client is on 10.10.10.0 network, andt the cast device is on 192.168.1.0 network. Though I am able to ping and connect via smb from client to 192.168.1.0.. ??
Anyone has an idea ?

nicholasroenshof
OpenVpn Newbie
Posts: 4
Joined: Mon Feb 22, 2021 8:27 am

Re: Cast to chromecast devices on openvpnserver local lan

Post by nicholasroenshof » Tue Feb 23, 2021 1:03 pm

Just a hint. I think I need to run VPN in TAP / multicast mode to be able to cast to local devices. ?
Can anyone help changing my current config to tap mode ?
I tried changing dev = tun to: dev = tap, but it seems to not be enough

Hope someone can help :-)

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 8665
Joined: Fri Jun 03, 2016 1:17 pm

Re: Cast to chromecast devices on openvpnserver local lan

Post by TinCanTech » Tue Feb 23, 2021 1:35 pm

nicholasroenshof wrote: ↑
Tue Feb 23, 2021 1:03 pm
I tried changing dev = tun to: dev = tap, but it seems to not be enough
Because that is not enough.

Please see the howto.

nicholasroenshof
OpenVpn Newbie
Posts: 4
Joined: Mon Feb 22, 2021 8:27 am

Re: Cast to chromecast devices on openvpnserver local lan

Post by nicholasroenshof » Thu Feb 25, 2021 6:47 am

Thanks :-)
Works now, running i tap mode
and bridge between LAN and TAP device đź‘Ť

Post Reply