New Member
August 8, 2014
Solved
" deny" rule getting bypassed
- August 8, 2014
- 21 replies
- 73357 views
I have an Action:DENY policy setup at the top of the ruleset for inbound traffic from WAN1 to DMZ. The source address for this policy is a group which consists of some geography-based networks and " bad addresses" that come up frequently in the IPS. However, this policy doesn' t ever seem to get matched and hosts I have explicitly added to the blacklist group--or even as their own entry--are matched against policies further down in the chain. I know this has to be something easy, but after staring at it for a couple of days I' m just not seeing it. Hopefully one of you fellows can see what I' m missing. This is on a FortiGate 80C running FortiOS 5.0.7 (build 3608). I' ve attached a screenshot of the rule set, but the relevant bits of code are here: 
config firewall address edit " all" next edit " outside.blacklist.121.139.0.0" set subnet 121.139.0.0 255.255.0.0 next edit " outside.blacklist.96.8.126.97" set subnet 96.8.126.0 255.255.255.0 next edit " outside.blacklist.108.61.91.211" set subnet 108.61.91.0 255.255.255.0 next end config firewall addrgrp edit " outside.blacklist.All" set member " outside.blacklist.96.8.126.97" " outside.blacklist.108.61.91.211" " outside.blacklist.121.139.0.0" [geography-based lists] next end config firewall policy edit 53 set srcintf " wan1" set dstintf " dmz" set srcaddr " outside.blacklist.All" set dstaddr " all" set schedule " always" set service " ALL" set logtraffic all next edit 26 set srcintf " wan1" set dstintf " dmz" set srcaddr " all" set dstaddr " nat.inbound.rounding" set action accept set schedule " always" set service " HTTP" " HTTPS" set utm-status enable set av-profile " MainAV" set ips-sensor " protect_http_server" set profile-protocol-options " default" next edit 37 set srcintf " wan1" set dstintf " dmz" set srcaddr " all" set dstaddr " nat.inbound.smtp" set action accept set schedule " always" set service " SMTP" set utm-status enable set av-profile " MainAV" set spamfilter-profile " MSPS Email Filter" set ips-sensor " protect_email_server" set profile-protocol-options " default" next edit 42 set srcintf " wan1" set dstintf " dmz" set srcaddr " all" set dstaddr " nat.inbound.owa" set action accept set schedule " always" set service " HTTPS" " HTTP" set utm-status enable set av-profile " MainAV" set ips-sensor " protect_http_server" set profile-protocol-options " default" next edit 49 set srcintf " wan1" set dstintf " dmz" set srcaddr " all" set dstaddr " nat.inbound.rdsgate" set action accept set schedule " always" set service " HTTPS" " RDS_external_UDP" set utm-status enable set av-profile " MainAV" set ips-sensor " protect_http_server" set profile-protocol-options " default" next edit 51 set srcintf " wan1" set dstintf " dmz" set srcaddr " all" set dstaddr " nat.inbound.remote" set action accept set schedule " always" set service " HTTPS" set utm-status enable set av-profile " MainAV" set ips-sensor " protect_http_server" set profile-protocol-options " default" next endThese policies have been in place for sometime, yet this morning I have had the same IP address showing up in my IPS logs quite a bit:
Message meets Alert condition The following intrusion was observed: " PHP.CGI.Argument.Injection" . date=2014-08-08 time=10:18:04 devname=fw01 devid=FGT80C3911608826 logid=0419016384 type=ips subtype=signature level=alert severity=high srcip=96.8.126.97 dstip=[DMZ address of host in policy 42 above] srcintf=" wan1" dstintf=" dmz" policyid=42 identidx=0 sessionid=13078459 status=dropped proto=6 service=http count=1 attackname=" PHP.CGI.Argument.Injection" srcport=33113 dstport=80 attackid=31752 sensor=" protect_http_server" ref=" http://www.fortinet.com/ids/VID31752" incidentserialno=513620505 msg=" web_server: PHP.CGI.Argument.Injection,"The source IP in this message is in my blacklist and I' ve tried specifying both it as a host and a /24 which included the address. Yet, inbound traffic from this host still seems to whiff past the deny policy and match against the next policy in the list instead. Any idea what I' m missing here? Any help at all is appreciated. Cheers, Rick

