Created
June 25, 2015 14:49
-
-
Save shoaibi/3f2d2b9b21bc4238c19f to your computer and use it in GitHub Desktop.
Block Steam's internet access using iptables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Block Steam's internet access using iptables | |
# Script must be run as a user with root (or one that has | |
# permissions to play with iptables) | |
# | |
# | |
# Why did i need it? Even when running in offline mode | |
# steam would keep trying to login and then once every | |
# while it'd end my dota bota match saying "Connection | |
# Lost". | |
iptables -A OUTPUT -p udp --dport 27000:27050 -j DROP | |
iptables -A OUTPUT -p tcp --dport 27000:27050 -j DROP | |
iptables -A OUTPUT -p tcp --destination 79.140.94.16 -j DROP | |
iptables -A OUTPUT -p tcp --destination 79.140.94.18 -j DROP | |
iptables -A OUTPUT -p tcp --destination 162.254.192.18 -j DROP | |
iptables -A OUTPUT -p tcp --destination 8.254.43.254 -j DROP | |
iptables -A OUTPUT -p tcp --destination 8.254.130.126 -j DROP | |
iptables -A OUTPUT -p tcp --destination 162.254.192.16 -j DROP | |
Given the script was created 5 years ago, I am almost sure that the current IPs that steam client uses have changed in the mean while.
Perhaps try a sniffer to see which IPs steam client connects with and block them?
Or you can run steamclient under a different user and block all network access for processes owned by that user.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tried it on a router, steam login and downloads still work