Recently bought a Linode VPS to proxy and cache, did not think in the iptables rules, incredibly unable to start Iptables, reported the following error:
1. First Problem Solution:
cp/etc/init.d/iptables/etc/init.d/iptables.oldbak--
Vi/etc/init.d/iptables
Find the case "$i" in this line, as follows:
For i in $tables; Todo
Echo-n "$i"
Case "$i" in
Raw
$IPTABLES-t raw-p prerouting $policy \
&& $IPTABLES-t raw-p OUTPUT $policy \
|| Let Ret+=1
;;
Filter
$IPTABLES-t filter-p INPUT $policy \
&& $IPTABLES-t filter-p OUTPUT $policy \
&& $IPTABLES-t filter-p FORWARD $policy \
|| Let Ret+=1
;;
Nat
Modified as follows:
For i in $tables; Todo
Echo-n "$i"
Case "$i" in
Security
$IPTABLES-t filter-p INPUT $policy \
&& $IPTABLES-t filter-p OUTPUT $policy \
&& $IPTABLES-t filter-p FORWARD $policy \
|| Let Ret+=1
;;
Raw
$IPTABLES-t raw-p prerouting $policy \
&& $IPTABLES-t raw-p OUTPUT $policy \
|| Let Ret+=1
;;
Filter
$IPTABLES-t filter-p INPUT $policy \
&& $IPTABLES-t filter-p OUTPUT $policy \
&& $IPTABLES-t filter-p FORWARD $policy \
|| Let Ret+=1
;;
Nat
2. The 2nd problem-solving approach:
cp/etc/sysconfig/iptables-config/etc/sysconfig/iptables-config.oldbak--
Turn off the Ip_conntrack_netbios_ns module
Sed-i ' s/iptables_modules= ' Ip_conntrack_netbios_ns '/# #IPTABLES_MODULES = ' ip_conntrack_netbios_ns '/g '/etc/ Sysconfig/iptables-config
3. Restart Iptables
Service Iptables Restart
Flushing firewall rules: [OK]
Setting chains to policy accept:security raw NAT mangle fi[OK]
Unloading iptables modules: [OK]
Applying iptables firewall rules: [OK]
OK, iptables started up, problem solving, can only say that the Linode kernel loaded modules are too few.