iptables -I INPUT -j ACCEPT open all ports?
This will accept all traffic that is inbound and destined for this computer; all ports, all protocols, all users, all states. Remember that port isn't the only thing you have to think about when writing a firewall on a Linux System. Any traffic that is outbound or destined for another computer may have different rules. However if your rules are this, for example
iptables -I INPUT -j ACCEPT iptables -I INPUT -j DROP
the second rule will end up being before the first and all traffic will be dropped. If you want to allow all traffic. I generally recommend using
-A instead of
-I when writing a firewall script so the order is obvious. Also if you just want to allow everything, you'd be better off setting the policy for the chain.
iptables -P INPUT ACCEPT
will tell everything that hasn't matched another rule at the end of INPUT to be allowed.
iptables -I INPUT -j ACCEPT
The above command will INSERT (-I) a new rule at chain position 1 (understood by omission) that matches every packet crossing the INPUT chain (because their are no filters) and will ACCEPT it.
Yes. This command creates a rule that will be checked first (
-I) for incoming packets (
INPUT); the rule matches every packet (no filter) and allows them (
Yes, provided that the packet is not dropped in