1

I am using the command below to allow all traffic from hosts on my internal network but it says "iptables v1.4.18: Couldn't load target `ALLOW':No such file or directory". What is the problem here?

iptables -A input -s 192.168.1.0/24 -j ALLOW

1 Answer 1

3

The target isn't ALLOW it should be ACCEPT.

$ iptables -A INPUT -s 192.168.1.0/24 -j ACCEPT

excerpt iptables man page

TARGETS

A firewall rule specifies criteria for a packet, and a target. If the packet does not match, the next rule in the chain is the examined; if it does match, then the next rule is specified by the value of the target, which can be the name of a user-defined chain or one of the special values ACCEPT, DROP, QUEUE, or RETURN.

ACCEPT means to let the packet through. DROP means to drop the packet on the floor. QUEUE means to pass the packet to userspace (if supported by the kernel). RETURN means stop traversing this chain and resume at the next rule in the previous (calling) chain. If the end of a built-in chain is reached or a rule in a built-in chain with target RETURN is matched, the target specified by the chain policy determines the fate of the packet.

3
  • When I changed my command like that it said "iptables: No chain/target/match by that name."(Ubuntu). But it worked correctly on openSUSE.
    – Mr. White
    Commented Dec 7, 2013 at 18:05
  • Make it a upper case INPUT.
    – slm
    Commented Dec 7, 2013 at 18:09
  • @Mr.White - np, thanks for the Q. Glad to have helped.
    – slm
    Commented Dec 7, 2013 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .