Page 1 of 1

DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Sat Dec 04, 2021 5:49 pm
by adilou1981
Hello ,

Problem : in client side my domains are not resolved
when I "ping www.google.com" I get
Ping request could not find host www.google.com. Please check the name and try again.

PLEASE HELP

My Client is using Windows 10 (Open VPN Connect) my openvpn client file cnotains this :
Client Config

client
dev tun
proto udp
remote myRemotServerIpValue 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert myclient1.crt
key myclient1.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
verb 3


My Server is using Ubuntu
I added this to myserver.conf

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"

So the full content of my server file is :

Server Config

port 1194
proto udp
dev tun

ca ca.crt
cert myservername.crt
key myservername.key
dh dh2048.pem

server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"

keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 3
explicit-exit-notify 1


Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Sun Dec 05, 2021 11:32 pm
by TinCanTech
adilou1981 wrote:
Sat Dec 04, 2021 5:49 pm
PLEASE HELP
READ HOWTO

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Tue Dec 07, 2021 2:16 pm
by adilou1981
I did it but not found a solution yet

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Tue Dec 07, 2021 2:56 pm
by TinCanTech
Read it again .. There is a section specifically describing your requirements.

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Wed Dec 08, 2021 8:36 am
by adilou1981
Hello TinCanTech,

If you are refereing to the section "Routing all client traffic (including web-traffic) through the VPN "
This is what I did : push redirect gateway and push dhcp option with dns to the client. But not working .

If you see what is my problem please give a hand on it , because I am on it since many days ....

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Wed Dec 08, 2021 2:13 pm
by TinCanTech
Read it again .. carefully.

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Thu Dec 09, 2021 8:47 am
by adilou1981
if you mean this line :
push "dhcp-option DNS 8.8.8.8" I used instead 10.8.0.1 but not working that's why I put google DNS

You can help me learn from mistakes if you have the solution this the purpose of this forum I guess ....

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Thu Dec 09, 2021 2:02 pm
by TinCanTech
IP_Forwarding ...

Re: DNS issue : I want to Forward all traffic including web from Client to Server including

Posted: Sat Dec 11, 2021 4:40 pm
by openvpn_inc
adilou1981 wrote:
Thu Dec 09, 2021 8:47 am
if you mean this line :
push "dhcp-option DNS 8.8.8.8" I used instead 10.8.0.1 but not working that's why I put google DNS
Hi,

All you have told us is that ping(1) is unable to resolve names. That is not much to go on. Did you try pinging by IP address, to-wit:

Code: Select all

ping -c3 8.8.8.8
I guess there is something in the howto that you missed, but hard to say what it is. Could be IP forwarding not enabled. Show us your firewall rules on the server. If it's iptables,

Code: Select all

iptables-save -c # or if nft:
nft show ruleset
hth, regards, rob0