iptables Ubuntu 13.04 Sream game server?
4 Replies
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
. Really hard to read like this. thisWhat'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."
@Nuvini:
Please answer my other questions.
i got lazy and installed arno-iptables-firewall works fine now