自从 Linux 移除了自动分配 helper 的功能 net.netfilter.nf_conntrack_helper 之后,所有的 conntrack helper 需要手动分配才能生效。
利用下面的 iptables 指令,可以模拟被移除的自动分配 helper 行为:
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 
 | iptables -t raw -A PREROUTING -p tcp --dport 21 -j CT --helper ftp
 
 iptables -t raw -A PREROUTING -p tcp --dport 6667 -j CT --helper irc
 
 iptables -t raw -A PREROUTING -p tcp --dport 5060 -j CT --helper sip
 iptables -t raw -A PREROUTING -p udp --dport 5060 -j CT --helper sip
 
 iptables -t raw -A PREROUTING -p udp --dport 69 -j CT --helper tftp
 
 iptables -t raw -A PREROUTING -p udp --dport 1719 -j CT --helper RAS
 iptables -t raw -A PREROUTING -p tcp --dport 1720 -j CT --helper Q.931
 
 iptables -t raw -A PREROUTING -p udp --dport 10080 -j CT --helper amanda
 
 iptables -t raw -A PREROUTING -p udp --dport 161 -j CT --helper snmp
 
 iptables -t raw -A PREROUTING -p tcp --dport 1723 -j CT --helper pptp
 
 |