For Xbox to work, these are the known ports for its usage:
Port 88 (UDP)
Port 3074 (UDP and TCP)
Port 53 (UDP and TCP)
Port 80 (TCP)
Port 500 (UDP)
Port 3047 (UDP and TCP)
Port 3544 (UDP)
Port 4500 (UDP)
Now, these are ports that are reliant on your router, and not you're PC that you're streaming with however, the data streaming is most likely occurring on one of these.
To find which port your PC is actually using to stream content to xbox, you'll want to run an nmap scan on your PC's local address, and your Xbox's local address.
- Download nmap: https://nmap.org/book/inst-windows.html
- Install nmap and allow loop back traffic to be configured
- Login to your router via 192.168.1.1 or 10.0.0.1 (whatever redirects you to your routers login page).
- Find the local IP address of your xbox something like 10.0.0.123 or 192.168.1.123
- Set up the streaming from your PC to your xbox before proceeding (THIS IS VITAL)
- Once proper IPs are found, open NMAP and enter these commands and wait until each scan finishes before starting another.
nmap -sS -sU -p 1-65535 -T4 -A -v 192.168.1.ip_of_your_xbox
nmap -sS -sU -p 1-65535 -T4 -A -v 192.168.1.ip_of_your_pc
When the scans have finished and you have identified the ports necessary, its time to close off the firewall.
To close off all connections, inbound and outbound on your computer, you must execute the following command strings in an elevated command prompt window.
Right click cmd.exe and Run as Administrator
netsh advfirewall set allprofiles firewallpolicy blockinbound,blockoutbound
You're going to want to allow basic outbound services such as HTTP, HTTPS, DNS by default. Use this format for the ports identified from the above steps.
3.1. Allow HTTP(Internet to websites)
netsh advfirewall firewall add rule name="HTTP" dir=out action=allow protocol=TCP remoteport=80
3.2) Allow HTTPS(Internet to websites)
netsh advfirewall firewall add rule name="HTTPS" dir=out action=allow protocol=TCP remoteport=443
3.3) Allow DNS(Name resolution)
netsh advfirewall firewall add rule name="DNS" dir=out action=allow protocol=UDP remoteport=53 program="%%systemroot%%\system32\svchost.exe" service="dnscache"
Finally, add the ports identified for the service you wish to use on your xbox:
netsh advfirewall firewall add rule name="Xbox_Service_Stream" dir=out action=allow protocol=ReplaceThisWithProtocol remoteport=ReplaceThisWithPort
This command will reset all changes made this process:
netsh advfirewall reset
This command will delete all rules on your firewall (Not that good of an idea)
Delete all rules:
netsh advfirewall firewall delete rule all