Skip to content

Instantly share code, notes, and snippets.

@wrossmann
Created December 11, 2021 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrossmann/c953e0e07a8617da45dcd64190f35ada to your computer and use it in GitHub Desktop.
Save wrossmann/c953e0e07a8617da45dcd64190f35ada to your computer and use it in GitHub Desktop.
Nginx config to filter out requests and User-Agents that contain LogJam jndi strings.
if ( $http_user_agent ~* "\${jndi:" ) {
return 400;
}
if ( $request_uri ~* "(\$|%24)({|%7b)(j|%6a)(n|%6e)(d|%64)(i|%69)(:|%3a)" ) {
return 400;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment