| 1 | 7dtd uses several ports to allow for its functionality. By default these are |
| 2 | ||= Port =||= Default =||= Protocol =||= Direction =||= Used for =|| |
| 3 | || BasePort || 25000 || UDP || In || Game || |
| 4 | || BasePort+1 || 25001 || UDP || In || Game || |
| 5 | || BasePort+2 || 25002 || UDP || In || Game || |
| 6 | || WebControlPort || 8080 || TCP || In || Web based control panel || |
| 7 | || TelnetPort || 8081 || TCP || In || Telnet control || |
| 8 | || 270xx || || UDP || Out || Registering at the server list || |
| 9 | |
| 10 | WebControlPort / TelnetPort:: |
| 11 | Only if enabled in serverconfig. |
| 12 | 270xx:: |
| 13 | Should be in the range 27015 - 27030 according to [https://support.steampowered.com/kb_article.php?ref=8571-GLVN-8711&l=english Valve]. But as others have been reported too I would simply suggest opening 27000 up to 27050 here. |
| 14 | |
| 15 | If you have a firewall set up that blocks all traffic by default you have to open at least the Game ports (default 25000 - 25001). If you also want the server to be listed on the server list the 270xx ports have also to be opened. ''iptables'' rules for this could look like this: |
| 16 | {{{ |
| 17 | iptables -A OUTPUT -s <yourServerIp>/32 -p udp --dport 27000:27099 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT |
| 18 | iptables -A INPUT -d <yourServerIp>/32 -p udp --sport 27000:27099 -m state --state RELATED,ESTABLISHED -j ACCEPT |
| 19 | iptables -A INPUT -d <yourServerIp>/32 -p udp --dport 25000:25002 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT |
| 20 | iptables -A OUTPUT -s <yourServerIp>/32 -p udp --sport 25000:25002 -m state --state RELATED,ESTABLISHED -j ACCEPT |
| 21 | }}} |
| 22 | |
| 23 | |
| 24 | == Protecting the Telnet interface == |
| 25 | |