windows 7 - How to Block ALL incoming/outgoing internet traffic EXCEPT streaming to an Xbox?
2014-04
How can I block all incoming/outgoing internet traffic except streaming to an Xbox 360?
For the past few weeks, streaming video files from my PC to my Xbox 360 has started failing, with the videos pausing to (presumably) buffer, and then continuing only to pause again a short time later, making the videos unwatchable.
This never happened before and I can only assume something else on my PC (which has many background and foreground programs open at any one time) is competing with the bandwidth.
No other PC or device is connected on the internal network and everything is where it's always been.
That's why I want to try blocking all incoming and outgoing traffic on my PC except the streaming to my Xbox.
Find out what port you are using to stream to the X-Box and configure the windows firewall to only allow traffic over that port.
You can open the firewall settings by typing in wf.msc
into the search box on the start menu.
How can I block all ports except
- ssh (port 22)
- httpd (port 80)
using iptables and iphains?
Ipchains are old and i do not reccomend it
simple script
#!/bin/bash
IPTABLES=/sbin/iptables
#start and flush
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -X
$IPTABLES -P FORWARD DROP
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT ACCEPT
#SSH traffic
$IPTABLES -A INPUT -p tcp --dport 22 -j ACCEPT
#HTTP traffic
$IPTABLES -A INPUT -p tcp --dport 80 -j ACCEPT
#loopback
iptables -A INPUT -i lo -p all -j ACCEPT
Which Linux distribution? You may be better off using a higher level firewall like ufw:
As root/sudo: ufw default deny ufw allow ssh ufw allow http ufw enable