Block URL through OpenVPN server

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
OpenVpn Newbie
Posts: 1
Joined: Wed Aug 21, 2019 1:13 pm

Block URL through OpenVPN server

Post by ST3NO » Wed Aug 21, 2019 1:34 pm

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
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
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
status openvpn-status.log
log openvpn-log.log
verb 4
crl-verify crl.pem

Post Reply