F
F
FEDKOTV2019-12-04 16:08:39
linux
FEDKOTV, 2019-12-04 16:08:39

How to disable requests to a specific site on the server?

There is a Debian web server on AWS.
It is necessary to prohibit any requests to api.telegram.org .
How to implement this task? help please

Answer the question

In order to leave comments, you need to log in

6 answer(s)
L
Lev Zabudkin, 2019-12-14
@FEDKOTV

route add -host 149.154.167.220 reject

R
Ronald McDonald, 2019-12-04
@Zoominger

Block requests for this domain in iptables, there are a lot of instructions.

R
Roman Molchanov, 2019-12-04
@Dobryak88

In /etc/hosts set this domain to localhost, for example.

F
FeNUMe, 2019-12-04
@FeNUMe

Try:
Drop all incoming from url
Drop all outgoing
to url

I
Ivan Shumov, 2019-12-04
@inoise

Everything is the same , nothing changes

A
Amir Averbakh, 2019-12-05
@rzfoxify

AWS has no standard means to deny outgoing EC2 traffic based on hostname. Security Groups, in principle, cannot prohibit traffic (only allow), NACls work at the TCP level.
besides the iptables mentioned above, you have several other options:
1. use a forward proxy and filter traffic directly on it (
2. AWS WAF (not 100% sure, but filtering is there in theory), but this will require AWS ELB

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question