Skip to main content
Andreas77_FTNT
Staff
Staff
August 5, 2019

Technical Tip: Chromecast across subnets

  • August 5, 2019
  • 1 reply
  • 43729 views

Description
This article describes how to allow traffic from client device to Chromecast and vice versa.

Solution
Chromecast uses a set of protocols including DIAL, mDNS, SSDP and HTTP.
This usually works well on the same subnet, however when using different subnets and a FortiGate, the traffic will need to be allowed and NAT’ed.
The FortiGate needs to be configured to forward multicast packets and to not change the TTL.

# config system settings
    set multicast-ttl-notchange enable
    set multicast-forward enable
end

In this example, the following parameters are used:

1) Lan interface which includes a wifi SSID where the Chromecast is connected: Subnet 192.168.1.0/24
2) Internal5 interface where a PC with Chrome Browser is installed: Subnet 192.168.2.0/24

Create a custom address for SSDP multicast address:

# config firewall multicast-address
    edit "SSDP"
    set start-ip 239.255.255.250
    set end-ip 239.255.255.250
end

Configure the Multicast Policies:

# config firewall multicast-policy
    edit 1
        set srcintf "lan"
        set dstintf "internal5"
        set srcaddr "all"
        set dstaddr "Bonjour" SSDP"
        set snat enable
    next
    edit 2
        set srcintf "internal5"
        set dstintf "lan"
        set srcaddr "all"
        set dstaddr "Bonjour" "SSDP"
        set snat enable
    next
end

Note: “Bonjour” multicast address object is created by default on the FortiGate and the IP address used is the same as mDNS (224.0.0.251).

Custom port ranges can be configured to restrict the traffic to the Chromecast devices.

# config firewall service custom
edit "Chromecast UDP ports"
        set udp-portrange 32768-61000
    next
    edit "Chromecast HTTP ports"
        set tcp-portrange 8008-8009
    next
end

As well, one can create address objects for the Chromecast device and the PC VLAN:

# config firewall address
    edit "ChromecastDevice"
        set subnet 192.168.1.15 255.255.255.255
    next
    edit "PC_Subnet"
        set subnet 192.168.2.0 255.255.255.0
    next
end


Finally, the IPv4 policies for communication across subnets have to be created:

# config firewall policy
    edit 1
        set name "CC to PC_Subnet"
        set srcintf "lan"
        set dstintf "internal5"
        set srcaddr "ChromecastDevice"
        set dstaddr "PC_Subnet"
        set action accept
        set schedule "always"
        set service "Chromecast UDP ports" "Chromecast HTTP ports"
        set nat enable
    next
    edit 2
        set name " PC_Subnet to CC "
        set srcintf "internal5"
        set dstintf "lan"
        set srcaddr "PC_Subnet"
        set dstaddr "ChromecastDevice "
        set action accept
        set schedule "always"
        set service "Chromecast UDP ports" "Chromecast HTTP ports"
        set nat enable
    next
end

Now, the PC on another subnet should be able to cast to the Chromecast located on the other subnet.

Troubleshooting

Make sure no device in between is dropping multicast packets or has IGMP enabled. The Multicast packets should be coming to the FortiGate whenever the “Cast” button of Chrome is used. These packets can be sniffed using following command:

# diagnose sniffer packet internal5 “host 224.0.0.251” 4 0 l

 

 

1 reply

jbethke
New Member
July 14, 2026

Hello!
I’ve three edits I’d suggest to the article:
Multicast Policies: The ports for mDNS and SSDP should have a separate policy pair for each. As only port ranges can be configured and not multiple separate ports, therefore separate policies are needed. Another edit here is that snat is may not be necessary and depends on the network topology used, so testing is warranted in the intended topology.
# config firewall multicast-policy
    edit 1
        set srcintf "lan"
        set dstintf "internal5"
        set srcaddr "all"
        set dstaddr "Bonjour"
        set protocol 17
        set start-port 5353
        set end-port 5353
    next
    edit 2
        set srcintf "internal5"
        set dstintf "lan"
        set srcaddr "all"
        set dstaddr "Bonjour"
        set protocol 17
        set start-port 5353
        set end-port 5353
    next
    edit 3
        set srcintf "lan"
        set dstintf "internal5"
        set srcaddr "all"
        set dstaddr "SSDP"
        set protocol 17
        set start-port 1900
        set end-port 1900
    next
    edit 4
        set srcintf "internal5"
        set dstintf "lan"
        set srcaddr "all"
        set dstaddr "SSDP”
        set protocol 17
        set start-port 1900
        set end-port 1900
    next
end

The final edit is adding in a component for Chromecast over wi-fi using a Bonjour Profile:
config wireless-controller bonjour-profile
    edit “lan-internal5-Chromecast"
        config policy-list
            edit 1
                set description "lan to internal5"
                set from-vlan "<vlan-id>"
                set to-vlan "<vlan-id>"
                set services chromecast
            next
            edit 2
                set description "internal5 to lan"
                set from-vlan "<vlan-id>"
                set to-vlan "<vlan-id>"
                set services chromecast
            next
        end
    next
end

**Note that if the interface is untagged, leave the vlan-id as 0 to use native network.

Then applying the profile to a WTP profile:
config wireless-controller wtp-profile
    edit "ap-profile"
        set bonjour-profile "lan-internal5-Chromecast"
    next
end

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!