ThomasM8 2014 年 8 月 12 日 上午 11:00
HLDS and iptables
I've installed HLDS on a dedicated machine running CentOS 6 and opened all ports in this list using similar commands to these of course changing udp to tcp where necessary:

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

Server connects to master and VAC servers, however nobody can connect to the server and it's not listed in favorites list (100% that ip/port is right).

If I turn off iptables it works as expected. I'm not an expert of using them so maybe I'm setting something wrong? For many other reasons I cannot leave iptables off.

Thanks!
< >
正在显示第 1 - 8 条,共 8 条留言
ThomasM8 2014 年 8 月 30 日 下午 3:03 
Hi, thanks for your reply, swaping source/destination ports was a good point but in my case that wasn't the cause of the problem.

Apparently default settings for my iptables (on CentOS 6) had REJECT rule at the end of the INPUT chain so when using iptables -A INPUT (which means append at the end of the chain) my rules were never reached as packets were rejected by the rule above. Solution was to use iptables -I INPUT <number of last rule (which is REJECT)>.
最后由 ThomasM8 编辑于; 2014 年 8 月 30 日 下午 3:04
Ltk 2015 年 3 月 28 日 上午 7:03 
Good lock!
Bilbon89 2015 年 9 月 5 日 上午 1:58 
quoi:steamsalty:
Bilbon89 2015 年 9 月 5 日 上午 1:59 
il y a t il quelqu un
Bilbon89 2015 年 9 月 5 日 上午 1:59 
:steambored:
Widzhi 2016 年 8 月 14 日 上午 9:32 
nice =)
KZ Power 2017 年 4 月 22 日 上午 10:49 
!
赤髪 2017 年 5 月 5 日 下午 5:13 
引用自 Indig0
I've installed HLDS on a dedicated machine running CentOS 6 and opened all ports in this list using similar commands to these of course changing udp to tcp where necessary:

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

Server connects to master and VAC servers, however nobody can connect to the server and it's not listed in favorites list (100% that ip/port is right).

If I turn off iptables it works as expected. I'm not an expert of using them so maybe I'm setting something wrong? For many other reasons I cannot leave iptables off.

Thanks!
< >
正在显示第 1 - 8 条,共 8 条留言
每页显示数: 1530 50