Block Link in linux

General support questions
mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Block Link in linux

Post by mekawy » 2017/12/04 15:35:43

Hello .
How can i block any link on linux?
I wanna to block some links or codes on my server
Can?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Block Link in linux

Post by avij » 2017/12/04 15:58:25

This is fairly easy to do with squid, a HTTP proxy. I use this myself at home to block the most annoying ads.

squid.conf:

Code: Select all

acl bad_url dstdomain "/etc/squid/bad-sites.acl"
http_access deny bad_url
bad-sites.acl:

Code: Select all

.example.com
net1.example.com
www.someblockedsite.com
Automagically redirecting the traffic to the proxy (see "transparent proxy" from your favourite search engine) might need some clever firewall rules, though. This is not a problem for myself, because I can simply point the single browser I use to the proxy.

mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Re: Block Link in linux

Post by mekawy » 2017/12/04 17:17:12

I want to block any request or access from other links , [ External Links ]

mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Block local host

Post by mekawy » 2017/12/04 17:37:03

Hello ..
i have 123flashchat server in linux centos , for hosting files like SWF and HTML , and others can access this files from local host directly by typing my host IP in Parameters
for example my file is : xxx.xxx.xxx.xxx.://123flashchat.swf
and they access by :
127.0.0.1:123flashchat..swf?init_host=xxx.xxx.xxx. <-- my server IP

I wanna to close 127.0.0.1 , Can?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Block Link in linux

Post by avij » 2017/12/04 18:47:32

Looks like there's a ban option available in 123 FlashChat. Perhaps you should use that to block 127.0.0.1, if that's what you want.

mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Re: Block Link in linux

Post by mekawy » 2017/12/04 18:59:21

123flashchat closed no more support there, that's because i am here ..
I needed your help , how can i block local host 127.0.0.1
If you know how can i solve it please let me know :)

mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Re: Block Link in linux

Post by mekawy » 2017/12/04 21:21:41

Help please :)

mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Re: Block Link in linux

Post by mekawy » 2017/12/05 21:23:23

Guys please help me

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Block Link in linux

Post by Whoever » 2017/12/06 06:04:29

Does this go through a web server such as Apache httpd? If so, you can block these in your web server configuration.

mekawy
Posts: 8
Joined: 2017/12/04 15:33:03

Re: Block Link in linux

Post by mekawy » 2017/12/06 22:52:40

Explain :(

Post Reply