# Difference in rule action when using "!" in destination IP field

**URL:** <https://forum.suricata.io/t/difference-in-rule-action-when-using-in-destination-ip-field/4177>\
**Category:** Help\
**Created:** [November 13, 2023, 1:42pm UTC](https://forum.suricata.io/t/difference-in-rule-action-when-using-in-destination-ip-field/4177 "2023-11-13T13:42:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saj\_7](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/saj_7/32/2117_2.png) [@Saj\_7](https://forum.suricata.io/u/Saj_7)\
**Post date:** [November 13, 2023, 1:42pm UTC](https://forum.suricata.io/t/difference-in-rule-action-when-using-in-destination-ip-field/4177/1 "2023-11-13T13:42:36Z")

</div>

> Please include the following information with your help request:
> 
> - Suricata version
> - Operating system and/or Linux distribution
> - How you installed Suricata (from source, packages, something else)

- user trying **curl -v -k -I [https://1.1.1.1](https://1.1.1.1)** and below are the scenarios that have different outcomes

1. curl stuck at client hello meaning drop rule kicked in using below rules

```auto
pass tcp $HOME_NET any <> $EXTERNAL_NET $HTTPS_PORTS (flow:not_established; sid: 11111; rev:2;)
drop tcp $HOME_NET any <> [!10.0.0.0/16] $HTTPS_PORTS (sid: 44444; rev:2;)

```

- User able to visit [https://1.1.1.1](https://1.1.1.1) using below rules

```auto
pass tcp $HOME_NET any <> $EXTERNAL_NET $HTTPS_PORTS (flow:not_established; sid: 11111; rev:2;)
drop tcp $HOME_NET any <> [1.1.1.0/8] $HTTPS_PORTS (sid: 44444; rev:2;)

```

1. User able to visit [https://1.1.1.1](https://1.1.1.1) using below rules

```auto
pass tcp $HOME_NET any <> $EXTERNAL_NET $HTTPS_PORTS (flow:not_established; sid: 11111; rev:2;)
drop tcp $HOME_NET any <> $EXTERNAL_NET $HTTPS_PORTS (sid: 44444; rev:2;)

```

1. Now if I add **flow:established** keyword in drop rule blocks the https traffic.

- My question is why the first scenario worked even if we don’t specify the flow keyword?

---

<div class="post-metadata">

**Author:** ![bmurphy](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bmurphy](https://forum.suricata.io/u/bmurphy)\
**Post date:** [November 14, 2023, 3:39pm UTC](https://forum.suricata.io/t/difference-in-rule-action-when-using-in-destination-ip-field/4177/2 "2023-11-14T15:39:49Z")

</div>

Can you provide a copy of your host variable definitions from the suricata.yaml?

---

<div class="post-metadata">

**Author:** ![Saj\_7](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/saj_7/32/2117_2.png) [@Saj\_7](https://forum.suricata.io/u/Saj_7)\
**Post date:** [November 15, 2023, 2:40am UTC](https://forum.suricata.io/t/difference-in-rule-action-when-using-in-destination-ip-field/4177/3 "2023-11-15T02:40:50Z")

</div>

@bmurphy

- Thanks for the response.
- The issue remains the same even when I replace the $HOME\_NET to any and $EXTERNAL\_NET to any in the rules above.  
Note : I don’t have access to the configurations files.

```auto
$HOME_NET --------> any
$EXTERNAL_NET ----> any

```

- When doing \* curl -v -I -k https;[//1.1.1.1](https://1.1.1.1) . below rule also blocks the TLS traffic, but if there is no “!” in the destination field drop action doesn’t enforced.

```auto
drop tcp any any <> !8.8.8.8 443 (sid: 44444; rev:2;)

```
