N
N
noRerih2011-01-21 16:35:15
Computer networks
noRerih, 2011-01-21 16:35:15

How to deny access to the site, emulating its inaccessibility / inoperability / ... etc?

Task: to block access to several sites (just in case, I’ll explain that these are online games, and not how harmful I am), but this must be done in such a way as not to arouse suspicion. Editing hosts to 127.0.0.1 is not an option, because The IP of the localhost is explicitly written in the error page. The simplest thing that comes to mind is emulation of unavailability by timeout, but I don’t know how to do it. Please help :)
upd . omg, it seems that not everyone reads the description, but is limited only to the title
In this regard: do not offer hosts!!
upd2 The problem is styling. I believe that all browser-based online games are sometimes unavailable, and they have their own errors on this topic. There was an idea to fish them out, but it's long and not too easy
upd3The most important thing is that I won’t have to do it, what’s what I have to explain to the woman, so I want to find a simpler solution. Therefore, emulation of unavailability by timeout is of most interest.

Answer the question

In order to leave comments, you need to log in

18 answer(s)
L
lafayette, 2011-01-21
@lafayette

Create firewall rules for the IP addresses of the online game servers. Or, if these are not browsers, you can even block certain ports (for Lineage 2, it will be enough to close port 2106, on which the authorization server hangs).

A
Anei, 2011-01-21
@Anei

Under these conditions, the task is generally unsolvable - it is impossible to emulate a specific error page of an arbitrary site (“stylization”) without first obtaining it.
An emulation option is to make your own server, put a handler that accepts requests from any URI and spins it in an endless loop:

<?php while (true) {} ?>

Optionally, in the PHP settings, set a smaller script execution timeout. The IP of your server will still have to be registered in hosts or the local DNS server.
The best option is to solve the problem by non-technical methods. For example, with a belt, a heavy stick, or deprivation of money.

E
ebogdanov, 2011-01-22
@ebogdanov

Change routes for IPs you know by directing them to the wrong gateway in advance.

K
Kalantyr, 2011-01-21
@Kalantyr

I block sites simply - in the hosts file
If Windows: C:\Windows\system32\drivers\etc\hosts
en.wikipedia.org/wiki/Hosts

V
VBart, 2011-01-22
@VBart

Take some kind of traffic shaper, set up rules that limit the speed of access to game servers to, say, 1 kb / s, as a result, everything will be so slow that it will be impossible to play.

O
Oleg Matrozov, 2011-01-21
@Mear

Hang a proxy and register it in the browser by default. Respectively intercepting a call to a site to return an error.

U
uadeveloper, 2011-01-21
@uadeveloper

TrafficWasher: habrahabr.ru/blogs/arbeit/112144/

V
Vladimir, 2011-01-21
@koef

And if you redirect calls to these sites to some left non-existent resources?
It should not turn out pale, just "This webpage is not available".

B
bagyr, 2011-01-21
@bagyr

Hosts and not 127.0.0.1, but something on the local network that says "Site under construction" or "Site under heavy load, please try again later"?

A
antonick, 2011-01-21
@antonic

Perhaps TMeter will do, have you tried it? If my memory serves me up to 3 filters for free.

A
Alexander, 2011-01-21
@Alexx_ps

Put a program like "parental control" for the Internet, there you can prohibit different sites, and set a password on the program itself.

E
equand, 2011-01-21
@equand

You need a proxy server for Windows that will redirect to the 503 page in case of errors. You can copy the apache 503 or nginx 504 page and give them as errors.
You can even use squid

A
AstonMartin, 2011-01-22
@AstonMartin

If this is for some office, then you can drive the domains of online games on the office router-dns-e to a page with an error message. True, xs how a woman will do it. I'll have to write a couple of scripts.

X
xRay, 2011-01-22
@xRay

As an option, the speed to these sites is very much cut, then the sites themselves will look as if not everything is good with them in the flesh to the timeouts

M
merlin-vrn, 2011-01-22
@merlin-vrn

They offered with a shaper, and there is also a statistics match - configure so that the packet is lost to / from certain addresses with a probability of 5%. They will work ... so-so.

@
@greynix, 2011-01-22
_

I dare to suggest, since we are told that the games are browser-based, we can try something at the DNS level, we find services that can provide the ability to compile their lists of allowed and prohibited domains, create a list and prescribe this DNS on the computer. Of course, there are many subtleties, in particular, what is your ip address (dynamic, static), you may need to install additional software. Examples of such services are opendns , skydns , dyndns .

L
lehha, 2011-01-22
@lehha

Throw IP into blackhole (nullroute) if there is a gateway through which clients go. On Linux (iptables) in its own way, on Windows it's also cool:
route -p add 96.30.5.209 MASK 255.255.255.255 192.168.0.199
in Windows, the main thing is to specify a non-existent gateway in the current network, otherwise the rule will not add. The -p switch forces the rule to be saved, otherwise it will not be there after the reboot.

X
xget, 2011-01-23
@xget

administrative methods are more effective!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question