Part 2 : The Firewall configuration
Here we will go briefly over how to configure iptables to use with Left 4 Dead 2 (and other Steam games in general). This is a short and basic guide
This is part 2 of a 4 part series on how to set up and config a Left 4 Dead 2 dedicated server on CentOS Linux.
Part 2 : Firewall configuration
If you’re linux box is on the internet you most likely have a firewall on it. If not, then you should really put a firewall on it. Steam uses alot of ports ( https://support.steampowered.com/kb_article.php?ref=8571-GLVN-8711 ), so you need to add exceptions to your firewall for these ports. For Example here is how you would go about doing it for iptables. Open “/etc/sysconfig/iptables” in an editor of your choice and put these lines somewhere in there.
##### # Steam Ports ##### # Game Client Traffic + Matchmaking and HLTV -A INPUT -p udp -m udp --dport 27000:27030 -j ACCEPT # Steam Downloads -A INPUT -p tcp -m tcp --dport 27014:27050 -j ACCEPT # Other ports for Steam -A INPUT -p udp -m udp --dport 4380 -j ACCEPT -A INPUT -p udp -m udp --dport 3478 -j ACCEPT -A INPUT -p udp -m udp --dport 4379 -j ACCEPT -A INPUT -p udp -m udp --dport 4380 -j ACCEPT
This should enable the use of all Steam features (steam download, voice and matchmaking). I’m sure some of these are not used by dedicated servers but I haven’t had time to look into this further. It’s a good rule of thumb to sort the rules in iptables in the order of their use on the machine, if your machine is primarily a web server then putting port 80 early in the list of rules is a good way to save few CPU cycles, and if your machine is a dedicated Steam server then putting the steam ports as early as possible will save CPU cycles. It’s also a good idea to begin the iptables with this :
# Accept everything fromt he loopback device -A INPUT -i lo -j ACCEPT # Accept stuff that has already been established or is related -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
Having the Related, established this early ensures that connections that are related to other connections or already established to your machine won’t have to travel a long list of rules before they are accepted.
this is it for Part 2, make sure to check out Part 3.
Jóhannes H. Laxdal is a specialized humanoid carbon unit whose field is computers and telling lousy jokes, it has a tendency to put "well" before every sentence it utters. In here you will find its ramblings about computer-related stuff.
Tags.net 7 8 2008 2008 R2 Administrator Administrator for web ADSI Application Pool AppPool asp.net backup BannerBitmap C# CentOS CIDR Create debian Decimal Dedicated Server Enumerate Enumerate Websites error IE 7 IIS IIS 6 install banner L4D2 Left 4 dead 2 Linux PeriodicRestartSchedule php Recycle Recycling Samba script spam Submask user-agent Website windows Windows 7 Windows 2008 R2 Windows Media Services WMS