Hi,
I’ve been using openconnect to connect to the corp network for a long time. Since I updated tumbleweed, DNS for corp addresses does not work anymore. The DNS servers are missing. When using them manually (nslookup IP DNS-1), I get the correct answer.
[FONT=monospace]# ll /etc/resolv.conf
lrwxrwxrwx 1 root root 26 Feb 28 2020 /etc/resolv.conf -> /run/netconfig/resolv.conf
[/FONT]# cat /etc/resolv.conf
/etc/resolv.conf is a symlink to /var/run/netconfig/resolv.conf
<skipped some comments>
Call “netconfig update -f” to force adjusting of /etc/resolv.conf.
search <domain-1> <domain-2>
nameserver <DNS-local-lan>
These are the settings I use without VPN, but connecting the VPN does not change anything here. Not sure if it changed that back when it worked.
Also tried the solution from https://bugzilla.opensuse.org/show_bug.cgi?id=1182107#c2 but that did not help here.
# grep hosts /etc/nsswitch.conf
Valid databases are: aliases, ethers, group, gshadow, hosts,
#hosts: files mdns_minimal [NOTFOUND=return] dns
hosts: files dns myhostname
openconnect returns the DNS server and a lot of other stuff:
sudo openconnect --protocol=pulse --authgroup “Phone OTP” --user <user> <host> -v --timestamp --deflate --no-dtls --reconnect-timeout 1
For about 200 different CIDRs:
[2021-11-16 12:37:41] Received split include route <CIDR>
4 exclude lines like this:
[FONT=monospace][2021-11-16 12:37:41] Received split exclude route <CIDR>
[/FONT][2021-11-16 12:37:41] Unknown attr 0x4000 len 1: 00
[2021-11-16 12:37:41] Unknown attr 0x4001 len 1: 00
[2021-11-16 12:37:41] Unknown attr 0x401f len 1: 00
[2021-11-16 12:37:41] Unknown attr 0x4020 len 1: 00
[2021-11-16 12:37:41] Unknown attr 0x4021 len 1: 00
[2021-11-16 12:37:41] Received MTU 1400 from server
[2021-11-16 12:37:41] Received DNS server <DNS-1>
[2021-11-16 12:37:41] Received DNS server <DNS-2>
[2021-11-16 12:37:41] Received DNS search domain <domain-3>
[2021-11-16 12:37:41] Unknown attr 0x4007 len 4: 00 00 00 01
[2021-11-16 12:37:41] Unknown attr 0x4019 len 1: 01
[2021-11-16 12:37:41] ESP only: 0
I traced /etc/openconnect/vpnc-script and added debug-echos so I can see what is executed for the DNS entries, and what are the variables’ values. Here’s the end (after adding the route entries, which are added to the system OK as shown by netstat -rn) of the log:
- for i in $INTERNAL_IP4_DNS
- echo <DNS-1>
- grep :
- set_network_route <DNS-1> 255.255.255.255 32
- NETWORK=<DNS-1>
- NETMASK=255.255.255.255
- NETMASKLEN=32
- /sbin/ip route replace <DNS-1>/32 dev tun0
- /sbin/ip route flush cache
- for i in $INTERNAL_IP4_DNS
- echo <DNS-2>
- grep :
- set_network_route <DNS-2> 255.255.255.255 32
- NETWORK=<DNS-2>
- NETMASK=255.255.255.255
- NETMASKLEN=32
- /sbin/ip route replace <DNS-2>/32 dev tun0
- /sbin/ip route flush cache
- ‘’ -n ‘’ ‘]’
- ‘’ -n ‘’ -o -n ‘’ ‘]’
- ‘’ -n ‘<DNS-1> <DNS-2>’ ‘]’
**+ modify_resolvconf_suse_netconfig - /sbin/netconfig modify -s vpnc -i tun0
**+ echo INTERFACE=tun0
INTERFACE=tun0 - echo ‘DNSSERVERS=<DNS-1> <DNS-2>’
DNSSERVERS=<DNS-1> <DNS-2> - echo DNSDOMAIN=<domain-3>
DNSDOMAIN=<domain-3> - run_hooks post-connect
- HOOK=post-connect
- ‘’ -d /etc/vpnc/post-connect.d ‘]’
- exit 0
So it looks like netconfig receives the correct values, but does not act accordingly.
Did the mechanism for adding DNS servers change and that change did not yet go into openconnect? Or did one of the last updates break netconfig? Any suggestions for a workaround or solution, please?