I have some set of rules in comodo firewall that work pretty well for my game server and ssh but I have no clue about how to adapt them to iptables.
Game server
Allow udp in: source address any; destination address any; source address any; destination port 27015 The following rules are needed for authentication, anti-cheat and updates. I analysed the packets and set up these rules. Allow udp out: source address any; destination address any; source address 26900; destination port any Allow tcp out: source address any; destination address any; source address any; destination port 27030-27039 Allow udp in: source address any; destination address any; source address any; destination port 26900 Allow tco out:source address any; destination address any; source address any; destination port 80
ssh server
For the ssh I need to accept incoming tcp connections to port 22 and outgoing tcp connection from port 22 right ?
If none of those rules are triggered I want to have the packets dropped. For instance, if the incoming packet is a response to a certain request from my computer it should be accepted.
I would also like to run my game server as a daemon, set the game server with high priority so that its (cpu) requests have precedence (just like a priority queue), and maybe chroot/sandbox so that if the application, that has priviliges, gets compromised hackers can not inject code and damage the system. Is there anything else that I should consider?
I do this on windows 7 with comodo which comes with a sandbox and packet filtering, and the task manager. So command line environment is a bit hard for me.
Thanks.






