EvilZone
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
EvilZone
»
General Tech
»
Networking
»
How could I block a domain from centos? (Don't want server to access the domain)
Print
Pages: [
1
]
Author
Topic: How could I block a domain from centos? (Don't want server to access the domain) (Read 682 times)
0 Members and 1 Guest are viewing this topic.
Derric
/dev/null
Posts: 6
Cookies: 0
How could I block a domain from centos? (Don't want server to access the domain)
«
on:
September 25, 2015, 02:01:47 am »
I run a small OpenVPN based VPN for my friends, and they are idiots and need to be blocked from a few websites.
How can I block them from accessing say, facebook.com? Like fully block them?
Report to moderator
Logged
Kulverstukas
Administrator
Zeus
Posts: 6627
Cookies: 542
Fascist dictator
Re: How could I block a domain from centos? (Don't want server to access the domain)
«
Reply #1 on:
September 25, 2015, 07:22:16 am »
Maybe iptables can help?
http://superuser.com/questions/626813/openvpn-squid-or-another-way-of-blocking-advertisements-websites
Report to moderator
Logged
My blog:
http://9v.lt/blog
0E 800
Not a VIP
VIP
Baron
Posts: 895
Cookies: 131
• тнε ιηтεяηεт ιs мү яεcүcℓε-вιη •
Re: How could I block a domain from centos? (Don't want server to access the domain)
«
Reply #2 on:
September 25, 2015, 07:52:44 pm »
Pretty sure in /etc/hosts you can specify a specific IP address for a given domain name.
So you can just put a line in there that redirects the site you want to block to the local host.
If you don't want facebook.com or
www.facebook.com
to go through, you can put these lines in the hosts file:
127.0.0.1 facebook.com
127.0.0.1
www.facebook.com
You might also want to review:
http://unix.stackexchange.com/questions/175621/how-to-block-the-social-websites-in-centos-through-proxy
Please use google search next time: 'centos block website'
«
Last Edit: September 25, 2015, 07:54:32 pm by 0E 800
»
Report to moderator
Logged
The invariable mark of wisdom is to see the miraculous in the common.
proxx
Avatarception
Global Moderator
Titan
Posts: 2803
Cookies: 256
ФФФ
Re: How could I block a domain from centos? (Don't want server to access the domain)
«
Reply #3 on:
September 26, 2015, 02:26:02 am »
The DNS null routing is a great idea and works like a charm, mobile apps use other domains/urls so you gotta make sure you catch all of it, can be a pain.
«
Last Edit: September 26, 2015, 02:27:13 am by proxx
»
Report to moderator
Logged
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage
Print
Pages: [
1
]
EvilZone
»
General Tech
»
Networking
»
How could I block a domain from centos? (Don't want server to access the domain)