B
B
Bogdan Gerasimenko2017-03-05 13:00:40
Information Security
Bogdan Gerasimenko, 2017-03-05 13:00:40

How to block outgoing traffic from the site?

Good afternoon,
Is it possible to somehow block outgoing traffic from my site. For example, to prevent scripts from accessing the xxx.com domain and loading something from it. Roughly speaking, how to block some IP addresses so that they cannot interact with my site.
Is this done via htaccess or does it need to be configured on the server side?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrew, 2017-03-05
@dasty

I understand you are talking about Javascript scripts? You can disable access to remote servers by changing these same scripts. Or remove them altogether if they don't do what you want.

B
Bogdan Gerasimenko, 2017-03-05
@Kleindberg

Found a solution on .htaccess:

#Запрет с определенного сайта или IP
Order allow,deny
allow from all
Deny from test.com test2.com

V
Vasya Petrov, 2017-03-09
@VasyaPertrov

Is it possible to somehow block outgoing traffic from my site

Denying outgoing traffic means that nothing will be delivered from the site to anyone. In other words, no one will see the site.
The server firewall/router, and not Apache with PHP, is engaged in the prohibition of outgoing to certain resources.
This "solution" denies access From the specified sites To yours. This is not at all the same as "prohibit scripts from accessing the xxx.com domain". But yes, it will not give the opportunity: "to load something from it." (Although it takes 1 minute to write domain aliases and redirects on the donor. So it may not help. Here is the IP ban - it's a little more difficult to get around. But not much).
Are you trying to fight viruses on the site in this way instead of getting rid of them? Oh well :

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question