Skip to content

Commit

Permalink
Use '-p all' instead of '-p ip', closes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
mrash committed Nov 16, 2015
1 parent 3ee71a0 commit c174590
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CREDITS
Expand Up @@ -104,3 +104,7 @@ Paulo Bruck
- Submitted a patch to fix a bug in fwsnort usage of the iptables
--ulog-prefix option (an invalid quote was being used previous to the
fix).

Github user mgaulton:
- Reported an issue where the iptables 'all' keyword should have been used
intead of 'ip' to represent all IP protocols as the argument to -p.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
fwsnort-1.6.6 (11//2014):
- Fixed an issue for Snort rules against all IP protocols should be
translated with the iptables '-p all' argument instead of '-p ip'. This
issue was reported by Github user mgaulton.

fwsnort-1.6.5 (08/26/2014):
- (Paulo Bruck) Submitted a patch to fix a bug in fwsnort usage of the
iptables --ulog-prefix option (an invalid quote was being used previous
Expand Down
3 changes: 2 additions & 1 deletion fwsnort
Expand Up @@ -1808,7 +1808,8 @@ sub ipt_build_rule() {
}

if ($hdr_hr->{'proto'} =~ /ip/) {
$rule .= " $ipt_hdr_opts{'proto'} $hdr_hr->{'proto'}";
### the special iptables keyword 'all' means all IP protocols
$rule .= " $ipt_hdr_opts{'proto'} all";
} else {
$rule .= " $ipt_hdr_opts{'proto'} $hdr_hr->{'proto'} " .
"-m $hdr_hr->{'proto'}";
Expand Down

0 comments on commit c174590

Please sign in to comment.