Skip to content

Instantly share code, notes, and snippets.

@metalefty
Last active July 6, 2023 01:00
Show Gist options
  • Save metalefty/e9124892678499399e0277a029ce6f2e to your computer and use it in GitHub Desktop.
Save metalefty/e9124892678499399e0277a029ce6f2e to your computer and use it in GitHub Desktop.
nginxやApacheのログのIPアドレスを逆引きするワンライナー
ruby -rresolv -ane 'puts "#{(Resolv.getname($F[0]) rescue $F[0])} #{$F[1..-1].join(" ")}"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment