No change in DNS when Client connected by ethernet

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
kaymaz
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 16, 2020 2:54 pm

No change in DNS when Client connected by ethernet

Post by kaymaz » Thu Jan 16, 2020 3:20 pm

Hello,

I'm running an OpenVpn server with very basic configuration, using ccd.

I'm pushing dns to client and it's working fine when they are connected to wifi. When they are connected by ethernet, the dns is not changed.
VPN uses splitted network.

Server OS:

Code: Select all

Linux ip-amd64 #1 SMP Debian 3.16.72-1 (2019-08-13) x86_64 GNU/Linux
Network:

Code: Select all

eth0      Link encap:Ethernet  HWaddr 02:d9:f7:3f:4e:9a  
          inet addr:10.10.10.10 Bcast:10.10.10.255  Mask:255.255.255.0
          inet6 addr:**9a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:823362168 errors:0 dropped:0 overruns:0 frame:0
          TX packets:818201048 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:922210812549 (858.8 GiB)  TX bytes:929904726483 (866.0 GiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:711 (711.0 B)  TX bytes:711 (711.0 B)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.9.0.1  P-t-P:10.9.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:22627714 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35621572 errors:0 dropped:17136 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:1558777941 (1.4 GiB)  TX bytes:37520288383 (34.9 GiB)
Server config:
server

port 1200
proto udp
dev tun
ca ca.crt
cert Dev.crt
key Dev.key # This file should be kept secret
dh dh2048.pem
server 10.9.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.10.0.0 255.255.0.0"
client-config-dir ccd
push "dhcp-option DNS 10.10.23.103"
client-to-client
keepalive 10 120
cipher AES-128-CBC # AES
comp-lzo
max-clients 30
user nobody
group nogroup
persist-key
persist-tun
username-as-common-name
plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
status openvpn-status.log
log-append openvpn.log
verb 4
client-cert-not-required
client-connect /etc/openvpn/connections-log.sh
client-disconnect /etc/openvpn/connections-log.sh
script-security 2


Client Config:
client

client
dev tun
proto udp
remote * 1200
resolv-retry infinite
nobind
#redirect-gateway def1
auth-user-pass
cipher AES-128-CBC

comp-lzo
verb 3


Is there something I can do?

Thanks
Last edited by kaymaz on Fri Jan 17, 2020 9:40 am, edited 1 time in total.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 6456
Joined: Fri Jun 03, 2016 1:17 pm

Re: No change in DNS when Client connected by ethernet

Post by TinCanTech » Thu Jan 16, 2020 4:32 pm

What client OS ?

Please see:
viewtopic.php?f=30&t=22603#p68963

kaymaz
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 16, 2020 2:54 pm

Re: No change in DNS when Client connected by ethernet

Post by kaymaz » Fri Jan 17, 2020 8:00 am

It is Windows 10 clients

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 6456
Joined: Fri Jun 03, 2016 1:17 pm

Re: No change in DNS when Client connected by ethernet

Post by TinCanTech » Fri Jan 17, 2020 11:54 am

See --block-outside-dns in the manual.

Post Reply