Error: iptables: No chain/target/match by that name [duplicate]
I am trying to configure proxy server on RHEL Server 6.5 using Squid and iptables. Below is the command I executed and the error message it displayed:
vzlptest01 root [root] > iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables: No chain/target/match by that name.
Some more details:
vzlptest01 root [root] > cat /proc/net/ip_tables_matches
limit
state
length
ttl
tcpmss
multiport
multiport
tos
tos
dscp
icmp
udplite
udp
tcp
vzlptest01 root [root] > cat /proc/net/ip_tables_targets
DNAT
SNAT
LOG
TOS
TOS
DSCP
TCPMSS
REJECT
ERROR
How to deal with this issue?
Solution 1:
It looks like you don't have a INPUT table. You could try creating it with
iptables -N INPUT
If that does't work than I would look at the virtualization technology in use and speak to the hosting provider about it.
As an aside
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
You almost certainly don't want to do that with a -A
, -I
would be much better in nearly all circumstaces.