Red Hat Bugzilla – Bug 485033
iptables -p ALL --dport not allowed according to man 8 iptables
Last modified: 2011-07-21 12:10:02 EDT
Description of problem:
Faulty syntax in documentation
May also be error in other places
or a fault and wrong in man iptables(8)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Follow deployment guide and edit /etc/sysconfig/iptables
-A INPUT -p ALL -s! 192.168.0.0/24 --dport 834 -j DROP
2. service iptables restart
3. change -p all to -p tcp or -p udp
4. service iptables restart
5. service started OK
iptables-restore will complain about --dport
service started OK
This may be a fault somewere
but man 8 iptables
-p all = tcp, udp and icmp
This module matches a set of source or destination ports. Up to 15 ports can be specified.
A port range (port:port) counts as two ports. It can only be used in conjunction with -p tcp or -p udp.
--source-ports [!] port[,port[,port:port...]]
Match if the source port is one of the given ports.
The flag --sports is a convenient alias for this option.
--destination-ports [!] port[,port[,port:port...]]
Match if the destination port is one of the given ports.
The flag --dports is a convenient alias for this option.
--ports [!] port[,port[,port:port...]]
Match if either the source or destination ports are equal to one of the given ports.
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Verified in 188.8.131.52. Assign Static Ports and Use iptables Rules of Red_Hat_Enterprise_Linux-Deployment_Guide-5-en-US-6-40