Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Apply rule if pattern does not match #416

Open
nihil-admirari opened this issue May 19, 2021 · 2 comments
Open

[Feature Request] Apply rule if pattern does not match #416

nihil-admirari opened this issue May 19, 2021 · 2 comments

Comments

@nihil-admirari
Copy link

I want to create a rule to block all but localhost connections. Rules editor tells me to use negated character classes:

[x] Action: deny
[x] To this destination IP: [^:127.0.0.1:]

AFAIK, there are no custom character classes in regex, and the above pattern is equivalent to [^0127.:], i.e. it's gonna match 172.21.0.17 and similar addresses besides 127.0.0.1.

Since negative lookarounds are not supported, can you please add an ability to invert a match (like grep -v)?

@NRGLine4Sec
Copy link
Contributor

Maybe you could do it with two rules :
The first with a name like 000-allow-application_name wich allow connections to ^(127.0.0.1)$ and check the case Priority rule in the rules editor.
The second with a name like 111-deny-application_name wich deny all connections and check the case Priority rule in the rules editor.

@nihil-admirari
Copy link
Author

Making an allow priority rule does work in this case.

Nonetheless, I'm leaving this feature request open, since an ability to invert a match is nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants