I have an OpenVPN server running with the following config file
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
tls-crypt myvpn.tlsauth
cipher AES-256-CBC
compress lz4-v2
push "compress lz4-v2"
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log /var/log/openvpn.log
verb 3
remote-cert-eku "TLS Web Client Authentication"
and I have different clients connected, on Debian machines I used the following config file
client
tls-client
ca ca.crt
cert pibox.crt
key pibox.key
tls-crypt myvpn.tlsauth
proto tcp
remote X.X.X.X 1194 tcp
dev tun
topology subnet
cipher AES-256-CBC
log /var/log/openvpn.log
pull
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
all is working fine, I can access to my VPN and also I have access to the internet, I'm trying to set up a CentOS 7 client for which I used the same config file but since
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
cannot be used, I'm not sure how can I configure the DNS, I research and some people mention openresolv
, I also tried with
pull-filter ignore "dhcp-option DNS"
but nothing works, also, I read this but I don't have
/usr/share/openvpn/update-resolv-conf
/usr/share/openvpn/update-resolv-conf
What is the correct procedure to configure the DNS on a CentOS client?