I installed and configured an instance of OpenVPN on my VPS, my goal is to block access to certain sites for all clients connected to the vpn.
To do this I added the url to be blocked in the /etc/hosts file of my VPS, associating them with address 0.0.0.0.
If from the VPS I use ping/traceroute the url is correctly associated with the "localhost", while from the client connected to the OpenVPN server I can still reach the site.
I cannot understand the cause of the problem, even if I feel like excluding the DNS and I believe it is more the fault of an incorrect configuration of the OpenVPN server.
Thanks in advance to anyone who can give me a tip.
This is the configuration file:
Code: Select all
port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn-log.log
verb 4
crl-verify crl.pem