Resolve Linode cannot start iptables solution

Source: Internet
Author: User
Tags iptables

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.