LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptables, Error occurred at line 7 (https://www.linuxquestions.org/questions/linux-security-4/iptables-error-occurred-at-line-7-a-4175438718/)

windstory 11-26-2012 12:17 AM

iptables, Error occurred at line 7
 
My box is scientific Linux 6.3 x64, and I am trying to test "the program for iptables and dyndns at http://www.geeklab.info/2011/02/ipta...d-dynamic-dns/ "


Code:

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:DYNAMIC
-A INPUT -j DYNAMIC
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Code:

# service iptables restart
iptables: Flushing firewall rules:                        [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                              [  OK  ]
iptables: Applying firewall rules: iptables-restore v1.4.7: iptables-restore: line 7 policy invalid

Error occurred at line: 7
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
                                                          [FAILED]

The code of Line 7 is this.

Code:

:DYNAMIC
Any comment for this would be appreciated.

Thanks in advance.

GeekLabInfo 11-26-2012 02:22 AM

The line
:DYNAMIC
should read
:DYNAMIC - [0:0]

Fixed it on geeklab.info as well. Thanks.

---------- Post added 11-26-12 at 09:23 AM ----------

*sigh* no smileys of course but colon-D
:DYNAMIC - [0:0]


All times are GMT -5. The time now is 10:07 AM.