DNS Problems: No DNS servers have been specified

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
jameszp
OpenVpn Newbie
Posts: 3
Joined: Sat May 27, 2023 7:49 pm

DNS Problems: No DNS servers have been specified

Post by jameszp » Sun May 28, 2023 3:47 am

I seem to be able to connect to my openvpn server, but am unable to route any internet through the tunnel. I am unable to ping or resolve any public sites, so I am having some DNS issues (and maybe other issues I'm just unaware of).

I would like to be able to forward all internet traffic through the openvpn for accessing other devices on the local network, web browsing, and so on. I eventually plan to configure the vpn to be tap, but I'm trying to get the configuration to work with tun first.

I am running the openvpn server from my Ubuntu 22.04 machine on port 1194.
My server is behind my TP-link router which is behind an ASUS router that faces the public internet. (this is not ideal but the current setup)
My client is a Macbook with macOS Ventura Version 13.3.1 (a). I'm using Tunnelblick 3.8.8a.

I'm currently trying to get it to work on my LAN since I only have one public ip address available, and I recognize having the client and server on the same network may cause problems. I plan to be using clients when I'm out and about so I would ideally like to handle both of those scenarios.

Since there are two routers, I can connect the Macbook to either, giving either a 192.168.0.X address for the TP-Link Router or a 192.168.1.X address for the ASUS router. I also tried connecting via iPhone hotspot which has the cellular public address, but I read somewhere that this could cause problems with DNS assignment, so I will ignore that case for now.

Code: Select all

Server:
Ubuntu OpenVPN Server	- 192.168.0.200
TP-Link Router		- 192.168.0.1 / 192.168.1.20
Asus Router		- 192.168.1.1 / public ip address / myserver.tplinkdns.com (DDNS)

Asus 	(192.168.1.1) forwards port 1194 (UDP) to TP-Link 		(192.168.1.20)
TP-Link (192.168.0.1) forwards port 1194 (UDP) to Ubuntu OpenVPN Server (192.168.0.200)

Client:
Macbook			- 192.168.0.X for TP-Link connection or 192.168.1.X for Asus connection
I have attached the configuration and log file from Tunnelblick and redacted some of the ip addresses and names for anonymity.

Ubuntu OpenVPN Server .conf file

#################################################
# Sample OpenVPN 2.0 config file for #
# multi-client server. #
# #
# This file is for the server side #
# of a many-clients <-> one-server #
# OpenVPN configuration. #
# #
# OpenVPN also supports #
# single-machine <-> single-machine #
# configurations (See the Examples page #
# on the web site for more info). #
# #
# This config should work on Windows #
# or Linux/BSD systems. Remember on #
# Windows to quote pathnames and use #
# double backslashes, e.g.: #
# "C:\\Program Files\\OpenVPN\\config\\foo.key" #
# #
# Comments are preceded with '#' or ';' #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
;local a.b.c.d

# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one. You will need to
# open up this port on your firewall.
port 1194

# TCP or UDP server?
;proto tcp
;proto tcp4
;proto udp
proto udp4

# "dev tun" will create a routed IP tunnel,
# "dev tap" will create an ethernet tunnel.
# Use "dev tap0" if you are ethernet bridging
# and have precreated a tap0 virtual interface
# and bridged it with your ethernet interface.
# If you want to control access policies
# over the VPN, you must create firewall
# rules for the the TUN/TAP interface.
# On non-Windows systems, you can give
# an explicit unit number, such as tun0.
# On Windows, use "dev-node" for this.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel if you
# have more than one. On XP SP2 or higher,
# you may need to selectively disable the
# Windows firewall for the TAP adapter.
# Non-Windows systems usually don't need this.
;dev-node MyTap

# SSL/TLS root certificate (ca), certificate
# (cert), and private key (key). Each client
# and the server must have their own cert and
# key file. The server and all clients will
# use the same ca file.
#
# See the "easy-rsa" directory for a series
# of scripts for generating RSA certificates
# and private keys. Remember to use
# a unique Common Name for the server
# and each of the client certificates.
#
# Any X509 key management system can be used.
# OpenVPN can also use a PKCS #12 formatted key file
# (see "pkcs12" directive in man page).
ca ca.crt
cert myubuntu_openvpn.crt
key myubuntu_openvpn.key # This file should be kept secret

# Diffie hellman parameters.
# Generate your own with:
# openssl dhparam -out dh2048.pem 2048
dh dh.pem

# Network topology
# Should be subnet (addressing via IP)
# unless Windows clients v2.0.9 and lower have to
# be supported (then net30, i.e. a /30 per client)
# Defaults to net30 (not recommended)
topology subnet

# Configure server mode and supply a VPN subnet
# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.255.0

# Maintain a record of client <-> virtual IP address
# associations in this file. If OpenVPN goes down or
# is restarted, reconnecting clients can be assigned
# the same virtual IP address from the pool that was
# previously assigned.
ifconfig-pool-persist /var/log/openvpn/ipp.txt

# Configure server mode for ethernet bridging.
# You must first use your OS's bridging capability
# to bridge the TAP interface with the ethernet
# NIC interface. Then you must manually set the
# IP/netmask on the bridge interface, here we
# assume 10.8.0.4/255.255.255.0. Finally we
# must set aside an IP range in this subnet
# (start=10.8.0.50 end=10.8.0.100) to allocate
# to connecting clients. Leave this line commented
# out unless you are ethernet bridging.
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

# Configure server mode for ethernet bridging
# using a DHCP-proxy, where clients talk
# to the OpenVPN server-side DHCP server
# to receive their IP address allocation
# and DNS server addresses. You must first use
# your OS's bridging capability to bridge the TAP
# interface with the ethernet NIC interface.
# Note: this mode only works on clients (such as
# Windows), where the client-side TAP adapter is
# bound to a DHCP client.
;server-bridge

# Push routes to the client to allow it
# to reach other private subnets behind
# the server. Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"

# To assign specific IP addresses to specific
# clients or if a connecting client has a private
# subnet behind it that should also have VPN access,
# use the subdirectory "ccd" for client-specific
# configuration files (see man page for more info).

# EXAMPLE: Suppose the client
# having the certificate common name "Thelonious"
# also has a small subnet behind his connecting
# machine, such as 192.168.40.128/255.255.255.248.
# First, uncomment out these lines:
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
# Then create a file ccd/Thelonious with this line:
# iroute 192.168.40.128 255.255.255.248
# This will allow Thelonious' private subnet to
# access the VPN. This example will only work
# if you are routing, not bridging, i.e. you are
# using "dev tun" and "server" directives.

# EXAMPLE: Suppose you want to give
# Thelonious a fixed VPN IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
# ifconfig-push 10.9.0.1 10.9.0.2

# Suppose that you want to enable different
# firewall access policies for different groups
# of clients. There are two methods:
# (1) Run multiple OpenVPN daemons, one for each
# group, and firewall the TUN/TAP interface
# for each group/daemon appropriately.
# (2) (Advanced) Create a script to dynamically
# modify the firewall in response to access
# from different clients. See man
# page for more info on learn-address script.
;learn-address ./script

# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# or bridge the TUN/TAP interface to the internet
# in order for this to work properly).
#push "redirect-gateway def1 bypass-dhcp"
push "redirect-gateway def1"

# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses. CAVEAT:
# http://openvpn.net/faq.html#dhcpcaveats
# The addresses below refer to the public
# DNS servers provided by opendns.com.
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
;push "dhcp-option DNS 192.168.1.1"
;push "dhcp-option DNS 192.168.0.1"
;push "dhcp-option DNS 1.0.0.1"
;push "dhcp-option DNS 1.1.1.1"
;push "dhcp-option DNS 8.8.8.8"
;push "dhcp-option DNS 8.8.4.4"
push "dhcp-option DNS 10.8.0.1"

# Uncomment this directive to allow different
# clients to be able to "see" each other.
# By default, clients will only see the server.
# To force clients to only see the server, you
# will also need to appropriately firewall the
# server's TUN/TAP interface.
;client-to-client

# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names. This is recommended
# only for testing purposes. For production use,
# each client should have its own certificate/key
# pair.
#
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn

# The keepalive directive causes ping-like
# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.
keepalive 10 120

# For extra security beyond that provided
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
# openvpn --genkey tls-auth ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
tls-auth ta.key 0 # This file is secret
#tls-cipher TLS_AES_256_GCM_SHA384

# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
# Note that v2.4 client/server will automatically
# negotiate AES-256-GCM in TLS mode.
# See also the ncp-cipher option in the manpage
#cipher AES-256-CBC
data-ciphers AES-256-GCM

# Enable compression on the VPN link and push the
# option to the client (v2.4+ only, for earlier
# versions see below)
;compress lz4-v2
;push "compress lz4-v2"

# For compression compatible with older clients use comp-lzo
# If you enable it here, you must also
# enable it in the client config file.
;comp-lzo

# The maximum number of concurrently connected
# clients we want to allow.
;max-clients 100

# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.
user nobody
#group nobody
group nogroup

# The persist options will try to avoid
# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun

# Output a short status file showing
# current connections, truncated
# and rewritten every minute.
status /var/log/openvpn/openvpn-status.log

# By default, log messages will go to the syslog (or
# on Windows, if running as a service, they will go to
# the "\Program Files\OpenVPN\log" directory).
# Use log or log-append to override this default.
# "log" will truncate the log file on OpenVPN startup,
# while "log-append" will append to it. Use one
# or the other (but not both).
;log /var/log/openvpn/openvpn.log
;log-append /var/log/openvpn/openvpn.log

# Set the appropriate level of log
# file verbosity.
#
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
#verb 3
verb 6

# Silence repeating messages. At most 20
# sequential messages of the same message
# category will be output to the log.
;mute 20

# Notify the client that when the server restarts so it
# can automatically reconnect.
explicit-exit-notify 1


I also ran the following command for iptables on the Ubuntu server:

Code: Select all

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
sudo iptables -t nat -n -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  10.8.0.0/24          0.0.0.0/0
Ubuntu Server Macbook Client .conf file

##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap

# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
;proto tcp
;proto tcp4
proto udp4

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote myserver.tplinkdns.com 1194
;remote my-server-1 1194
;remote my-server-2 1194

# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
;remote-random

# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody

# Try to preserve some state across restarts.
persist-key
persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]

# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ca.crt
cert my_macbook_pro_16_client.crt
key my_macbook_pro_16_client.key

# Verify server certificate by checking that the
# certificate has the correct key usage set.
# This is an important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the keyUsage set to
# digitalSignature, keyEncipherment
# and the extendedKeyUsage to
# serverAuth
# EasyRSA can do this for you.
remote-cert-tls server

# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
# Note that v2.4 client/server will automatically
# negotiate AES-256-GCM in TLS mode.
# See also the data-ciphers option in the manpage

#cipher AES-256-CBC
data-ciphers AES-256-GCM

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
#comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20


;allow-recursive-routing
float


I believe the log below comes from an instance where I ran the Ubuntu OpenVPN server and connected my Macbook to the public facing Asus Router (192.168.1.1).

Code: Select all

*Tunnelblick: macOS 13.3.1 (22E772610a); Tunnelblick 3.8.8a (build 5776); Admin user
git commit 6e38647ea05b2c04c4d0c9888ef97fce672df8b9 + uncommitted changes:
?? ../third_party/sources/IOUserEthernetController.h 
The Tunnelblick.app process is not being translated (x86_64)
System Integrity Protection is enabled
Model: MacBookPro16,1

Configuration my_macbook_pro_16_client

"Sanitized" condensed configuration file for /Users/my_username/Library/Application 
Support/Tunnelblick/Configurations/my_macbook_pro_16_client.tblk:

client
dev tun
proto udp4
remote myserver.tplinkdns.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert my_macbook_pro_16_client.crt
key my_macbook_pro_16_client.key
remote-cert-tls server
tls-auth ta.key 1
data-ciphers AES-256-GCM
verb 3
float


================================================================================

Files in my_macbook_pro_16_client.tblk:
      Contents/Resources/ta.key
      Contents/Resources/my_….crt
      Contents/Resources/ca.crt
      Contents/Resources/config.ovpn
      Contents/Resources/my_….key

================================================================================

Tunnelblick Kext Policy Data:

net.tunnelblick.tap|Z2SG5H3HC8|Jonathan Bullard|1|1
net.tunnelblick.tun|Z2SG5H3HC8|Jonathan Bullard|1|1

================================================================================

Configuration preferences:

-notOKToCheckThatIPAddressDidNotChangeAfterConnection = 0
-disableSecondaryNetworkServices = 1
-lastConnectionSucceeded = 1

================================================================================

Wildcard preferences:

-notOKToCheckThatIPAddressDidNotChangeAfterConnection = 0

================================================================================

Program preferences:

skipWarningAboutConvertingToTblks = 1
launchAtNextLogin = 1
tunnelblickVersionHistory = (
    "3.8.8a (build 5776)"
)
lastLaunchTime = 706904502.304062
lastLanguageAtLaunchWasRTL = 0
connectionWindowDisplayCriteria = showWhenConnectingAndConnected
maxLogDisplaySize = 102400
lastConnectedDisplayName = my_macbook_pro_16_client
keyboardShortcutIndex = 1
updateCheckAutomatically = 1
NSWindow Frame SettingsSheetWindow = 1111 443 829 548 0 0 3008 1692 
NSWindow Frame ConnectingWindow = 1309 1106 389 217 0 0 3008 1692 
detailsWindowFrameVersion = 5776
detailsWindowFrame = {{972, 206}, {1249, 522}}
detailsWindowLeftFrame = {{0, 0}, {233, 402}}
detailsWindowViewIndex = 0
detailsWindowConfigurationsTabIdentifier = log
leftNavSelectedDisplayName = my_macbook_pro_16_client
AdvancedWindowTabIdentifier = sounds
haveDealtWithOldTunTapPreferences = 1
haveDealtWithAlwaysShowLoginWindow = 1
haveDealtWithOldLoginItem = 1
haveDealtWithAfterDisconnect = 1
SUEnableAutomaticChecks = 1
SUScheduledCheckInterval = 86400
SULastCheckTime = 2023-05-27 18:21:42 +0000
SUHasLaunchedBefore = 1

================================================================================

Forced preferences:

(None)

================================================================================

Deployed forced preferences:

(None)

================================================================================

Tunnelblick Log:

2023-05-27 13:00:33.680742 *Tunnelblick: macOS 13.3.1 (22E772610a); Tunnelblick 3.8.8a (build 5776)
2023-05-27 13:00:34.137245 *Tunnelblick: Attempting connection with my_macbook_pro_16_client using shadow copy; Set nameserver = 769; 
monitoring connection
2023-05-27 13:00:34.138019 *Tunnelblick: openvpnstart start my_macbook_pro_16_client.tblk 52950 769 0 1 0 101761328 -ptADGNWradsgnw 
2.5.9-openssl-1.1.1t <password>
2023-05-27 13:00:34.157209 *Tunnelblick: openvpnstart starting OpenVPN
2023-05-27 13:00:34.495143 --cipher is not set. Previous OpenVPN version defaulted to BF-CBC as fallback when cipher negotiation failed in this 
case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
2023-05-27 13:00:34.495516 OpenVPN 2.5.9 x86_64-apple-darwin [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [MH/RECVDA] [AEAD] built on Feb 16 2023
2023-05-27 13:00:34.495538 library versions: OpenSSL 1.1.1t  7 Feb 2023, LZO 2.10
2023-05-27 13:00:34.496619 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:52950
2023-05-27 13:00:34.496650 Need hold release from management interface, waiting...
2023-05-27 13:00:34.762456 *Tunnelblick: openvpnstart log:
     OpenVPN started successfully.
     Command used to start OpenVPN (one argument per displayed line):
          /Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.5.9-openssl-1.1.1t/openvpn
          --daemon
          --log /Library/Application Support/Tunnelblick/Logs/-SUsers-Smy_username-SLibrary-SApplication 
Support-STunnelblick-SConfigurations-Smy_macbook_pro_16_client.tblk-SContents-SResources-Sconfig.ovpn.769_0_1_0_101761328.52950.openvpn.log
          --cd /Library/Application Support/Tunnelblick/Users/my_username/my_macbook_pro_16_client.tblk/Contents/Resources
          --machine-readable-output
          --setenv IV_GUI_VER "net.tunnelblick.tunnelblick 5776 3.8.8a (build 5776)"
          --verb 3
          --config /Library/Application Support/Tunnelblick/Users/my_username/my_macbook_pro_16_client.tblk/Contents/Resources/config.ovpn
          --setenv TUNNELBLICK_CONFIG_FOLDER /Library/Application 
Support/Tunnelblick/Users/my_username/my_macbook_pro_16_client.tblk/Contents/Resources
          --verb 3
          --cd /Library/Application Support/Tunnelblick/Users/my_username/my_macbook_pro_16_client.tblk/Contents/Resources
          --management 127.0.0.1 52950 /Library/Application Support/Tunnelblick/Mips/my_macbook_pro_16_client.tblk.mip
          --management-query-passwords
          --management-hold
          --script-security 2
          --route-up /Applications/Tunnelblick.app/Contents/Resources/client.up.tunnelblick.sh -9 -x -d -f -m -w -ptADGNWradsgnw
          --down /Applications/Tunnelblick.app/Contents/Resources/client.down.tunnelblick.sh -9 -x -d -f -m -w -ptADGNWradsgnw
2023-05-27 13:00:34.771339 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:52950
2023-05-27 13:00:34.798487 MANAGEMENT: CMD 'pid'
2023-05-27 13:00:34.798522 MANAGEMENT: CMD 'auth-retry interact'
2023-05-27 13:00:34.798545 MANAGEMENT: CMD 'state on'
2023-05-27 13:00:34.798564 MANAGEMENT: CMD 'state'
2023-05-27 13:00:34.798590 MANAGEMENT: CMD 'bytecount 1'
2023-05-27 13:00:34.799329 *Tunnelblick: Established communication with OpenVPN
2023-05-27 13:00:34.813871 *Tunnelblick: >INFO:OpenVPN Management Interface Version 3 -- type 'help' for more info
2023-05-27 13:00:34.815013 MANAGEMENT: CMD 'hold release'
2023-05-27 13:00:34.815222 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-05-27 13:00:34.816728 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-05-27 13:00:34.816750 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-05-27 13:00:34.816858 MANAGEMENT: >STATE:1685217634,RESOLVE,,,,,,
2023-05-27 13:00:34.933602 TCP/UDP: Preserving recently used remote address: [AF_INET]MY.PUBLIC.IP.ADDRESS:1194
2023-05-27 13:00:34.933683 Socket Buffers: R=[786896->786896] S=[9216->9216]
2023-05-27 13:00:34.933705 UDPv4 link local: (not bound)
2023-05-27 13:00:34.933720 UDPv4 link remote: [AF_INET]MY.PUBLIC.IP.ADDRESS:1194
2023-05-27 13:00:34.933748 MANAGEMENT: >STATE:1685217634,WAIT,,,,,,
2023-05-27 13:00:34.951577 MANAGEMENT: >STATE:1685217634,AUTH,,,,,,
2023-05-27 13:00:34.951636 TLS: Initial packet from [AF_INET]MY.PUBLIC.IP.ADDRESS:1194, sid=b5a346aa 0abece96
2023-05-27 13:00:34.960128 VERIFY OK: depth=1, CN=myserver_easyrsaCA
2023-05-27 13:00:34.960503 VERIFY KU OK
2023-05-27 13:00:34.960529 Validating certificate extended key usage
2023-05-27 13:00:34.960545 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-05-27 13:00:34.960561 VERIFY EKU OK
2023-05-27 13:00:34.960575 VERIFY OK: depth=0, CN=myserver_openvpn
2023-05-27 13:00:34.973009 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 253 bit ED25519, signature: 
ED25519
2023-05-27 13:00:34.973120 [myserver_openvpn] Peer Connection Initiated with [AF_INET]MY.PUBLIC.IP.ADDRESS:1194
2023-05-27 13:00:34.979104 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.8.0.1,route-gateway 
10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.4 255.255.255.0,peer-id 0,cipher AES-256-GCM'
2023-05-27 13:00:34.979454 OPTIONS IMPORT: timers and/or timeouts modified
2023-05-27 13:00:34.979500 OPTIONS IMPORT: --ifconfig/up options modified
2023-05-27 13:00:34.979531 OPTIONS IMPORT: route options modified
2023-05-27 13:00:34.979562 OPTIONS IMPORT: route-related options modified
2023-05-27 13:00:34.979598 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-05-27 13:00:34.979617 OPTIONS IMPORT: peer-id set
2023-05-27 13:00:34.979633 OPTIONS IMPORT: adjusting link_mtu to 1624
2023-05-27 13:00:34.979649 OPTIONS IMPORT: data channel crypto options modified
2023-05-27 13:00:34.979665 Data Channel: using negotiated cipher 'AES-256-GCM'
2023-05-27 13:00:34.979790 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2023-05-27 13:00:34.979814 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2023-05-27 13:00:34.980854 Opened utun device utun3
2023-05-27 13:00:34.980897 MANAGEMENT: >STATE:1685217634,ASSIGN_IP,,10.8.0.4,,,,
2023-05-27 13:00:34.980943 /sbin/ifconfig utun3 delete
                           ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
2023-05-27 13:00:34.984905 NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
2023-05-27 13:00:34.984974 /sbin/ifconfig utun3 10.8.0.4 10.8.0.4 netmask 255.255.255.0 mtu 1500 up
2023-05-27 13:00:34.988138 /sbin/route add -net 10.8.0.0 10.8.0.4 255.255.255.0
                           add net 10.8.0.0: gateway 10.8.0.4
2023-05-27 13:00:34.991121 /sbin/route add -net MY.PUBLIC.IP.ADDRESS 192.168.1.1 255.255.255.255
                           add net MY.PUBLIC.IP.ADDRESS: gateway 192.168.1.1
2023-05-27 13:00:34.993570 /sbin/route add -net 0.0.0.0 10.8.0.1 128.0.0.0
                           add net 0.0.0.0: gateway 10.8.0.1
2023-05-27 13:00:34.996225 /sbin/route add -net 128.0.0.0 10.8.0.1 128.0.0.0
                           add net 128.0.0.0: gateway 10.8.0.1
                           13:00:35 *Tunnelblick:  **********************************************
                           13:00:35 *Tunnelblick:  Start of output from client.up.tunnelblick.sh
                           13:00:37 *Tunnelblick:  Disabled 'Wi-Fi'
                           13:00:37 *Tunnelblick:  Disabled 'Thunderbolt Bridge'
                           13:00:37 *Tunnelblick:  Retrieved from OpenVPN: name server(s) [ 10.8.0.1 ], search domain(s) [ ] and SMB server(s) 
[ ] and using default domain name [ openvpn ]
                           13:00:37 *Tunnelblick:  Not aggregating ServerAddresses because running on macOS 10.6 or higher
                           13:00:37 *Tunnelblick:  Setting search domains to 'openvpn' because the search domains were not set manually (or are 
allowed to be changed) and 'Prepend domain name to search domains' was not selected
                           13:00:38 *Tunnelblick:  Saved the DNS and SMB configurations so they can be restored
                           13:00:38 *Tunnelblick:  Changed DNS ServerAddresses setting from '' to '10.8.0.1'
                           13:00:38 *Tunnelblick:  Changed DNS SearchDomains setting from '' to 'openvpn'
                           13:00:38 *Tunnelblick:  Changed DNS DomainName setting from '' to 'openvpn'
                           13:00:38 *Tunnelblick:  Did not change SMB NetBIOSName setting of ''
                           13:00:38 *Tunnelblick:  Did not change SMB Workgroup setting of ''
                           13:00:38 *Tunnelblick:  Did not change SMB WINSAddresses setting of ''
                           13:00:38 *Tunnelblick:  DNS servers '10.8.0.1' will be used for DNS queries when the VPN is active
                           13:00:38 *Tunnelblick:  NOTE: The DNS servers do not include any free public DNS servers known to Tunnelblick. This 
may cause DNS queries to fail or be intercepted or falsified even if they are directed through the VPN. Specify only known public DNS servers 
or DNS servers located on the VPN network to avoid such problems.
                           13:00:38 *Tunnelblick:  Flushed the DNS cache via dscacheutil
                           13:00:38 *Tunnelblick:  /usr/sbin/discoveryutil not present. Not flushing the DNS cache via discoveryutil
                           13:00:38 *Tunnelblick:  Notified mDNSResponder that the DNS cache was flushed
                           13:00:38 *Tunnelblick:  Not notifying mDNSResponderHelper that the DNS cache was flushed because it is not running
                           13:00:38 *Tunnelblick:  Setting up to monitor system configuration with process-network-changes
                           13:00:38 *Tunnelblick:  End of output from client.up.tunnelblick.sh
                           13:00:38 *Tunnelblick:  **********************************************
2023-05-27 13:00:38.656416 Initialization Sequence Completed
2023-05-27 13:00:38.656465 MANAGEMENT: >STATE:1685217638,CONNECTED,SUCCESS,10.8.0.4,MY.PUBLIC.IP.ADDRESS,1194,,
2023-05-27 13:00:39.763707 *Tunnelblick: Warning: No DNS servers have been specified.
2023-05-27 13:01:15.944889 *Tunnelblick: After 30.0 seconds, gave up trying to fetch IP address information using the ipInfo host's name after 
connecting.
2023-05-27 13:01:27.845400 *Tunnelblick: Disconnecting; VPN Details… window disconnect button pressed
2023-05-27 13:01:28.005678 *Tunnelblick: Disconnecting using 'kill'
2023-05-27 13:01:28.163352 event_wait : Interrupted system call (code=4)
2023-05-27 13:01:28.163756 /sbin/route delete -net MY.PUBLIC.IP.ADDRESS 192.168.1.1 255.255.255.255
                           route: writing to routing socket: not in table
                           delete net MY.PUBLIC.IP.ADDRESS: gateway 192.168.1.1: not in table
2023-05-27 13:01:28.166634 /sbin/route delete -net 0.0.0.0 10.8.0.1 128.0.0.0
                           delete net 0.0.0.0: gateway 10.8.0.1
2023-05-27 13:01:28.168982 /sbin/route delete -net 128.0.0.0 10.8.0.1 128.0.0.0
                           delete net 128.0.0.0: gateway 10.8.0.1
2023-05-27 13:01:28.171358 Closing TUN/TAP interface
2023-05-27 13:01:28.171634 /Applications/Tunnelblick.app/Contents/Resources/client.down.tunnelblick.sh -9 -x -d -f -m -w -ptADGNWradsgnw utun3 
1500 1552 10.8.0.4 255.255.255.0 init
                           13:01:28 *Tunnelblick:  **********************************************
                           13:01:28 *Tunnelblick:  Start of output from client.down.tunnelblick.sh
                           13:01:28 *Tunnelblick:  Cancelled monitoring system configuration changes
                           13:01:28 *Tunnelblick:  Re-enabled "Wi-Fi"
                           13:01:28 *Tunnelblick:  Re-enabled "Thunderbolt Bridge"
                           13:01:28 *Tunnelblick:  Removed State:DNS
                             No such key
                           13:01:28 *Tunnelblick:  Removed Setup:DNS
                           13:01:28 *Tunnelblick:  Restored DNS and SMB settings
                           13:01:28 *Tunnelblick:  Flushed the DNS cache with dscacheutil -flushcache
                           13:01:28 *Tunnelblick:  Notified mDNSResponder that the DNS cache was flushed
                           13:01:28 *Tunnelblick:  End of output from client.down.tunnelblick.sh
                           13:01:28 *Tunnelblick:  **********************************************
2023-05-27 13:01:28.653400 SIGTERM[hard,] received, process exiting
2023-05-27 13:01:28.653436 MANAGEMENT: >STATE:1685217688,EXITING,SIGTERM,,,,,
2023-05-27 13:01:29.209247 *Tunnelblick: Expected disconnection occurred.

================================================================================

Down log:

13:01:28 *Tunnelblick:  **********************************************
13:01:28 *Tunnelblick:  Start of output from client.down.tunnelblick.sh
13:01:28 *Tunnelblick:  Cancelled monitoring system configuration changes
13:01:28 *Tunnelblick:  Re-enabled "Wi-Fi"
13:01:28 *Tunnelblick:  Re-enabled "Thunderbolt Bridge"
13:01:28 *Tunnelblick:  Removed State:DNS
13:01:28 *Tunnelblick:  Removed Setup:DNS
13:01:28 *Tunnelblick:  Removed State:SMB
13:01:28 *Tunnelblick:  Restored DNS and SMB settings
13:01:28 *Tunnelblick:  Flushed the DNS cache with dscacheutil -flushcache
13:01:28 *Tunnelblick:  Notified mDNSResponder that the DNS cache was flushed
13:01:28 *Tunnelblick:  End of output from client.down.tunnelblick.sh
13:01:28 *Tunnelblick:  **********************************************

================================================================================

Previous down log:

12:43:34 *Tunnelblick:  **********************************************
12:43:34 *Tunnelblick:  Start of output from client.down.tunnelblick.sh
12:43:34 *Tunnelblick:  Cancelled monitoring system configuration changes
12:43:34 *Tunnelblick:  Re-enabled "Wi-Fi"
12:43:34 *Tunnelblick:  Re-enabled "Thunderbolt Bridge"
12:43:34 *Tunnelblick:  Removed State:DNS
12:43:34 *Tunnelblick:  Removed Setup:DNS
12:43:34 *Tunnelblick:  Removed State:SMB
12:43:34 *Tunnelblick:  Restored DNS and SMB settings
12:43:34 *Tunnelblick:  Flushed the DNS cache with dscacheutil -flushcache
12:43:34 *Tunnelblick:  Notified mDNSResponder that the DNS cache was flushed
12:43:34 *Tunnelblick:  End of output from client.down.tunnelblick.sh
12:43:34 *Tunnelblick:  **********************************************

================================================================================

Network services:

An asterisk (*) denotes that a network service is disabled.
*USB 10/100/1000 LAN 2
Wi-Fi
Thunderbolt Bridge

Wi-Fi Power (en0): On

================================================================================

ifconfig output:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
	inet 127.0.0.1 netmask 0xff000000 
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether ac:de:48:00:11:22 
	inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x4 
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (100baseTX <full-duplex>)
	status: active
ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
	options=400<CHANNEL_IO>
	ether 36:7d:da:08:11:bc 
	media: autoselect
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=400<CHANNEL_IO>
	ether 14:7d:da:08:11:bc 
	inet6 fe80::447:11d5:911e:32d5%en0 prefixlen 64 secured scopeid 0x8 
	inet 192.168.1.148 netmask 0xffffff00 broadcast 192.168.1.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
awdl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
	ether c6:98:04:eb:d2:18 
	inet6 fe80::c498:4ff:feeb:d218%awdl0 prefixlen 64 scopeid 0x9 
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=400<CHANNEL_IO>
	ether c6:98:04:eb:d2:18 
	inet6 fe80::c498:4ff:feeb:d218%llw0 prefixlen 64 scopeid 0xa 
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: inactive
en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=460<TSO4,TSO6,CHANNEL_IO>
	ether 82:0c:50:24:a0:04 
	media: autoselect <full-duplex>
	status: inactive
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=460<TSO4,TSO6,CHANNEL_IO>
	ether 82:0c:50:24:a0:01 
	media: autoselect <full-duplex>
	status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=460<TSO4,TSO6,CHANNEL_IO>
	ether 82:0c:50:24:a0:00 
	media: autoselect <full-duplex>
	status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=460<TSO4,TSO6,CHANNEL_IO>
	ether 82:0c:50:24:a0:05 
	media: autoselect <full-duplex>
	status: inactive
en7: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
	options=6467<RXCSUM,TXCSUM,VLAN_MTU,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
	ether 70:88:6b:89:aa:ea 
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (<unknown type>)
	status: inactive
en6: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
	options=404<VLAN_MTU,CHANNEL_IO>
	ether 00:e0:4c:68:4a:7b 
	media: autoselect (none)
	status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=63<RXCSUM,TXCSUM,TSO4,TSO6>
	ether 82:0c:50:24:a0:01 
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x0
	member: en1 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 12 priority 0 path cost 0
	member: en2 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 13 priority 0 path cost 0
	member: en3 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 14 priority 0 path cost 0
	member: en4 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 11 priority 0 path cost 0
	nd6 options=201<PERFORMNUD,DAD>
	media: <unknown type>
	status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
	inet6 fe80::5986:c310:bfd7:1159%utun0 prefixlen 64 scopeid 0x12 
	nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
	inet6 fe80::917b:6e94:18c6:31d2%utun1 prefixlen 64 scopeid 0x13 
	nd6 options=201<PERFORMNUD,DAD>
utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000
	inet6 fe80::ce81:b1c:bd2c:69e%utun2 prefixlen 64 scopeid 0x14 
	nd6 options=201<PERFORMNUD,DAD>

================================================================================

Non-Apple kexts that are loaded:

Index Refs Address            Size       Wired      Name (Version) UUID <Linked Against>

================================================================================

Quit Log:

2023-05-27 11:21:17.102282 applicationShouldTerminate: termination for unknown reason, probably Command-Q; delayed until 'shutdownTunnelblick' 
finishes)
2023-05-27 11:21:17.102859 shutDownTunnelblick: started.
2023-05-27 11:21:17.104155 shutDownTunnelblick: Starting cleanup.
2023-05-27 11:21:17.104536 cleanup: Entering cleanup
2023-05-27 11:21:17.111926 synchronized user defaults
2023-05-27 11:21:17.846246 shutDownTunnelblick: Cleanup finished.
2023-05-27 11:21:17.846772 Finished shutting down Tunnelblick; allowing termination

================================================================================

Traces Log:


================================================================================

Console Log:



I'm having a particularly hard time figuring out how to resolve the DNS issue indicated by these lines.

Code: Select all

2023-05-27 13:00:39.763707 *Tunnelblick: Warning: No DNS servers have been specified.
2023-05-27 13:01:15.944889 *Tunnelblick: After 30.0 seconds, gave up trying to fetch IP address information using the ipInfo host's name after 
connecting.
The TP-Link Router also comes with an option to enable OpenVPN. I was actually able to web browse and youtube on my Macbook over the VPN connection using Tunnelblick, so it seems to be possible and I just have a problem with my Ubuntu configuration. There was a problem with reconnecting after I disconnected the first time with the TP-Link OpenVPN server, but this is a small problem compared to what I'm having on the Ubuntu server.

TP-Link Server Macbook Client .ovpn file

client
dev tun
proto udp
float
nobind
cipher AES-128-CBC
comp-lzo adaptive
resolv-retry infinite
remote-cert-tls server
persist-key
persist-tun
remote myserver.tplinkdns.com 1194
<ca>
-----BEGIN CERTIFICATE-----
CA REDACTED
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
CERTIFICATE REDACTED
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
PRIVATE KEY REDACTED
-----END PRIVATE KEY-----
</key>

The Macbook client .conf files for the Ubuntu Server and TP-Link server don't seem all that different from each other. However, the TP-Link web interface doesn't really allow me to see what the server conf file looks like or change any of the configurations, so I'm a little bit in the dark on what's going on there.

I would like to get the VPN to work with the Ubuntu machine setup and would be more than happy to provide any additional information in order to resolve this issue. Thanks!

jameszp
OpenVpn Newbie
Posts: 3
Joined: Sat May 27, 2023 7:49 pm

Re: DNS Problems: No DNS servers have been specified

Post by jameszp » Sun Jun 04, 2023 4:45 pm

I was able to resolve this issue by using the NAT forwarding in iptables found here:
https://openvpn.net/community-resources ... gh-the-vpn

Code: Select all

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
In addition, I had pushed the wrong DNS server address for the server conf.
Instead of

Code: Select all

push "dhcp-option DNS 10.8.0.1"
I should've put

Code: Select all

push "dhcp-option DNS 192.168.0.1"
which is my router address and not the openvpn server address.

It also suffices to simply delete the dhcp-option altogether which just uses the default dhcp server provided by the ethernet postrouting.

Post Reply