nginx block user agent

How to block bad bots LieBaoFast, MQQBrowser and Mb2345Browser using Fail2ban

Our server suddenly got big traffic and this traffic detected…