iptables Ubuntu 13.04 Sream game server?

hello i was setting up a Ubuntu 13.04 steam server for TF2 and few more games and i was needing some help on the iptables the ones i have dont work and so i want out on the internet looking around for tables and i found a pastebin a http://pastebin.com/7Btmyz2h it has a lot of random ways i also found some nice ways to stop DDOS attack in the pastebin atm i want to run the Linode as a game server only i appreciate your help and thank you

4 Replies

Please read this. Really hard to read like this.

What's your goal for the firewall? What isn't working? Which errors are you getting? Did you try something simpler first, e.g. Just DROPing the ports you don't need and open the ports required for you to SSH/connect to TF2?

@Nuvini:

Please read this. Really hard to read like this.

What's your goal for the firewall? What isn't working? Which errors are you getting? Did you try something simpler first, e.g. Just DROPing the ports you don't need and open the ports required for you to SSH/connect to TF2?

#!/bin/bash

echo "Configuring IPTables SteamCMD"
#Reset to defaults
iptables -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

#Allow SSH
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

#Required ports for HLDS and SRCDS Servers
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT

#Other CS Forwards
iptables -A INPUT -p tcp --dport 1200 -j ACCEPT
iptables -A INPUT -p udp --dport 1200 -j ACCEPT
iptables -A INPUT -p tcp --dport 3478:4380 -j ACCEPT
iptables -A INPUT -p udp --dport 3478:4380 -j ACCEPT

#Reject all other traffic
iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
echo "IPTables configured sucessfully."

Please answer my other questions.

@Nuvini:

Please answer my other questions.
i got lazy and installed arno-iptables-firewall works fine now

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct