V
V
votod2015-09-20 20:36:58
Nginx
votod, 2015-09-20 20:36:58

How to block by hostname in nginx?

How to block by hostname in nginx?
HOST NAME
torproxy03.31173.se
How to block?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Chernykh, 2015-09-20
@sashkets

I don't know by name, but in the case of freebsd, you can use this host's IP
host -ta torproxy03.31173.se | awk '{print $4}' | xargs -n 1 ipfw add reject tcp from any to
blocks addresses. this is in case the host address changes
, but in general, you need to look at fail2ban

V
Vlad Zhivotnev, 2015-09-20
@inkvizitor68sl

No way, nginx does not resolve the return, otherwise it would slow down (and even if I learned it, I don’t advise turning on the resolve for the sake of one host).
iptables -A INPUT -s torproxy03.31173.se -j DROP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question