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

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
adilou1981
OpenVpn Newbie
Posts: 4
Joined: Sat Dec 04, 2021 5:36 pm

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

Post by adilou1981 » Sat Dec 04, 2021 5:49 pm

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


User avatar
TinCanTech
Forum Team
Posts: 10196
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Sun Dec 05, 2021 11:32 pm

adilou1981 wrote:
Sat Dec 04, 2021 5:49 pm
PLEASE HELP
READ HOWTO

adilou1981
OpenVpn Newbie
Posts: 4
Joined: Sat Dec 04, 2021 5:36 pm

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

Post by adilou1981 » Tue Dec 07, 2021 2:16 pm

I did it but not found a solution yet

User avatar
TinCanTech
Forum Team
Posts: 10196
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Tue Dec 07, 2021 2:56 pm

Read it again .. There is a section specifically describing your requirements.

adilou1981
OpenVpn Newbie
Posts: 4
Joined: Sat Dec 04, 2021 5:36 pm

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

Post by adilou1981 » Wed Dec 08, 2021 8:36 am

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 ....

User avatar
TinCanTech
Forum Team
Posts: 10196
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Wed Dec 08, 2021 2:13 pm

Read it again .. carefully.

adilou1981
OpenVpn Newbie
Posts: 4
Joined: Sat Dec 04, 2021 5:36 pm

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

Post by adilou1981 » 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

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

User avatar
TinCanTech
Forum Team
Posts: 10196
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Thu Dec 09, 2021 2:02 pm

IP_Forwarding ...

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 433
Joined: Tue Feb 16, 2021 10:41 am

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

Post by openvpn_inc » Sat Dec 11, 2021 4:40 pm

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
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply