Linux system, iptables is conducive to the configuration of Linux firewall, can control ip packet filtering, some users have encountered iptables: Protocol wrong type for socket. Error, I do not know what caused it, the following small series Let me introduce the solution to the error in the Linux system iptables.
on the wanted linode vps centos 6.4 iptables added limiting the number of connections can not exceed 100 ip rule:
iptables -A INPUT -p tcp --syn --dport 80 -m Connlimit --connlimit-above 100 -j REJECT
Error:
iptables: Protocol wrong type for socket.
Asked Linode customer service, said kernel and connlimit module Incompatible, the iptables version is too old and needs to be upgraded.
View iptables version:
[root@linode ~]# iptables -V
iptables v1.4.7
View iptables installation package:
[root@linode ~]# rpm -qa |
Grep iptables
iptables-1.4.7-9.el6.x86_64
iptables-ipv6-1.4.7-9.el6.x86_64
Solve the problem as follows: But note that iptables can no longer be managed with yum:
yum update
rpm -e --nodeps iptables-1.4.7-9.el6.x86_64
rpm - e --nodeps iptables-ipv6-1.4.7-9.el6.x86_64
yum groupinstall ‘Development Tools’
wget http://www.netfilter.org/projects/iptables /files/iptables-1.4.19.tar.bz2
tar jxf iptables-1.4.19.tar.bz2
cd iptables-1.4.19
LDFLAGS=&ldquo ;-L$PWD/libiptc/.libs” /configure --prefix=/usr --exec-prefix= --bindir=/usr/bin --with-xtlibdir=/lib/xtables --with-pkgconfigdir=/usr/lib/pkgconfig --enable-libipq - -enable-devel
make
make install
View iptables version:
[root@linode ~]# iptables -V
iptables v1.4.19
[root@linode iptables-1.4.19]# iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 100 -j REJECT
[root@linode iptables-1.4.19]# iptables -L
Chain INPUT (policy ACCEPT)
REJECT tcp -- anywhere anywhere tcp dpt:http flags:FIN, SYN, RST, ACK/SYN #conn src/32 》 100 reject-with icmp-port-unreachable
You can see that there is already a rule above.
The above is the Linux system iptables error iptables: Protocol wrong type for socket solution introduced, mainly because the iptables version is too low, due to upgrade.
Gentoo is a Linux-based operating system with near-infinite adaptability. Many frie
Some users may have a better understanding of Ubuntu 12.04 via VNC Remote Desktop, but this method o
Cacti is a network traffic monitoring graphical analysis tool, which needs to be im
After installing the WPS for Linux tool on the Ubuntu system, the system is missing fonts, which cau
How to change the name of Linux multi-network card?
Repairing database skills after Linux system crashes
How to view the version of MariaDB server on Linux system
How to burn an image file to a DVD disc under Linux
How to implement ioctl function in Linux system?
Introduction to multi-threaded shell scripts in Linux system
What should I do if the Ubuntu login screen resolution is too high?
What are the common operations of Linux?
Linux offline query dictionary method
What if CentOS fails to mount Glusterfs?
What should I do if ORA-12528 reports an error when building DataGuard in Linux?
How to protect computers from viruses.
The operating system's ally: Linux will dominate the rivers and lakes
How to configure and manage Win2003 system services
How to intercept the boot screen of Windows7 system
About the VISTA system can not be installed properly MSN8.5 solution
How to remove the alarm sound of Linux
How to use Win8 memory diagnostic tool
Computer installation operating system driver installation: First, the driver introduction (a)
How to restore the traditional Win7 control panel of Win10 system
How to do the device after the Win10 system update driver is