Skip to contentSkip to conversation

W10 Client assigns old AND new IPv6 address to TAP with GUI+Service but not with cmd prompt

Openvpn-devel debbie10t 7 participants 24 messages Jun 7, 2017 – Jun 15, 2017

lore
Share & tools
lore

debbie10t

author
#0 lore raw

Hi,

I have a basic setup and discovered that my W10 client was assigning a second IPv6 address to TAP even though it is *not* being pushed by the server. The second address is an old address from a server that I sometimes connect to. The server is still running but the client is not connected to it.

The most significant information here is that this *only* happens when using the openvpn-GUI + interactive-service.

When using the command prompt to run the W10 client manually the VPN is setup completely normally. Only the pushed address is used.

Below is the VPN which causes the strange behaviour.

SERVER (Linux Ubuntu .. The client connects to this)

conf
====
persist-key
persist-tun
client-to-client
;user nobody
;group nobody
verb 4
cd /etc/openvpn
dev tuns108
port 11948

server 10.8.0.0 255.255.255.0
server-ipv6 12fc:1918::10:8:0:0/112

client-config-dir defaults/ccd
ccd-exclusive

keepalive 10 30
comp-lzo no
push "comp-lzo no"
log defaults/108.log
management 127.0.0.1 11948

tls-auth
dh
ca
cert
key
====

CCD File (Verified that this file *is* used)
========

push-reset
push "ping 10"

      ping 10

push "ping-restart 30"
ping-restart 60
push "route 10.8.0.1"

ifconfig-push 10.8.0.110 10.8.0.109
ifconfig-ipv6-push 12fc:1918::10:8:0:110/112
=========

CLIENT (W 10.0.14393)

ovpn
====

dev-node defc108

dev-type tun

management 127.0.0.1 11948

resolv-retry infinite

client

explicit-exit-notify 3

reneg-sec 0

comp-lzo no

remote-cert-tls server

verb 4

remote ...
port 11948

proto udp

nobind

dhcp-option DISABLE-NBT

ca
cert
key
tls-auth
====

Most relevant parts of logs:

SERVER LOG
==========

Wed Jun  7 16:34:01 2017 us=552519 OpenVPN 2.5_git [git:master/07372a0fdeb36382] x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Feb 23 2017
Wed Jun  7 16:34:01 2017 us=552561 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
Wed Jun  7 16:34:01 2017 us=553657 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:11948
<s>
Wed Jun  7 16:34:01 2017 us=749800 ROUTE_GATEWAY 10.1.101.1/255.255.255.0 IFACE=eth0 HWADDR=00:30:1b:42:65:ac
Wed Jun  7 16:34:01 2017 us=750719 TUN/TAP device tuns108 opened
Wed Jun  7 16:34:01 2017 us=750798 TUN/TAP TX queue length set to 100
Wed Jun  7 16:34:01 2017 us=750854 do_ifconfig, tt->did_ifconfig_ipv6_setup=1
Wed Jun  7 16:34:01 2017 us=750916 /sbin/ifconfig tuns108 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Wed Jun  7 16:34:01 2017 us=756708 /sbin/ifconfig tuns108 add 12fc:1918::10:8:0:1/112
Wed Jun  7 16:34:01 2017 us=758869 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
<s>
Wed Jun  7 16:34:01 2017 us=760819 IFCONFIG POOL IPv6: (IPv4) size=62, size_ipv6=65536, netbits=112, base_ipv6=12fc:1918::10:8:0:1000
Wed Jun  7 16:34:01 2017 us=760843 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=1
Wed Jun  7 16:34:01 2017 us=760915 Initialization Sequence Completed
Wed Jun  7 16:34:32 2017 us=784338 MULTI: multi_create_instance called
Wed Jun  7 16:34:32 2017 us=784601 client.ip:3163 Re-using SSL/TLS context
<s>
Wed Jun  7 16:34:32 2017 us=785333 client.ip:3163 TLS: Initial packet from [AF_INET]client.ip:3163, sid=b26639a2 13444e2c
Wed Jun  7 16:34:32 2017 us=819223 client.ip:3163 VERIFY OK: depth=1, C=US, ST=California, L=San Francisco, O=Copyleft Certificate Co, OU=My Organizational Unit, CN=defaults, [email protected]...
Wed Jun  7 16:34:32 2017 us=820188 client.ip:3163 VERIFY OK: depth=0, C=US, ST=California, L=San Francisco, O=Copyleft Certificate Co, OU=My Organizational Unit, CN=defaultc01, [email protected]...
Wed Jun  7 16:34:32 2017 us=827342 client.ip:3163 peer info: IV_VER=2.4.2
Wed Jun  7 16:34:32 2017 us=827466 client.ip:3163 peer info: IV_PLAT=win
Wed Jun  7 16:34:32 2017 us=827507 client.ip:3163 peer info: IV_PROTO=2
Wed Jun  7 16:34:32 2017 us=827545 client.ip:3163 peer info: IV_NCP=2
Wed Jun  7 16:34:32 2017 us=827582 client.ip:3163 peer info: IV_LZ4=1
Wed Jun  7 16:34:32 2017 us=827629 client.ip:3163 peer info: IV_LZ4v2=1
Wed Jun  7 16:34:32 2017 us=827667 client.ip:3163 peer info: IV_LZO=1
Wed Jun  7 16:34:32 2017 us=827703 client.ip:3163 peer info: IV_COMP_STUB=1
Wed Jun  7 16:34:32 2017 us=827741 client.ip:3163 peer info: IV_COMP_STUBv2=1
Wed Jun  7 16:34:32 2017 us=827779 client.ip:3163 peer info: IV_TCPNL=1
Wed Jun  7 16:34:32 2017 us=827818 client.ip:3163 peer info: IV_GUI_VER=OpenVPN_GUI_11
<s>
Connection Initiated with [AF_INET]client.ip:3163
Wed Jun  7 16:34:32 2017 us=829379 defaultc01/client.ip:3163 OPTIONS IMPORT: reading client specific options from: defaults/ccd/defaultc01
Wed Jun  7 16:34:32 2017 us=830040 defaultc01/client.ip:3163 MULTI_sva: push_ifconfig_ipv6 12fc:1918::10:8:0:110/112
Wed Jun  7 16:34:32 2017 us=830334 defaultc01/client.ip:3163 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jun  7 16:34:32 2017 us=830384 defaultc01/client.ip:3163 MULTI: Learn: 10.8.0.110 -> defaultc01/client.ip:3163
Wed Jun  7 16:34:32 2017 us=830423 defaultc01/client.ip:3163 MULTI: primary virtual IP for defaultc01/client.ip:3163: 10.8.0.110
Wed Jun  7 16:34:32 2017 us=830465 defaultc01/client.ip:3163 MULTI: Learn: 12fc:1918::10:8:0:110 -> defaultc01/client.ip:3163
Wed Jun  7 16:34:32 2017 us=830505 defaultc01/client.ip:3163 MULTI: primary virtual IPv6 for defaultc01/client.ip:3163: 12fc:1918::10:8:0:110
Wed Jun  7 16:34:34 2017 us=70005 defaultc01/client.ip:3163 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun  7 16:34:34 2017 us=70294 defaultc01/client.ip:3163 SENT CONTROL [defaultc01]: 'PUSH_REPLY,ping 10,ping-restart 30,route 10.8.0.1,ifconfig-ipv6 12fc:1918::10:8:0:110/112 12fc:1918::10:8:0:1,ifconfig 10.8.0.110 10.8.0.109,peer-id 0,cipher AES-256-GCM' (status=1)
<s>
Wed Jun  7 16:34:34 2017 us=226401 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:34 2017 us=226531 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:34 2017 us=226617 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:35 2017 us=226119 defaultc01/client.ip:3163 MULTI: bad source address from client [12fc:1918::10:36:101:110], packet dropped

CLIENT LOG
==========

Wed Jun 07 16:33:50 2017 us=953420 OpenVPN 2.4.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on May 12 2017

Wed Jun 07 16:33:50 2017 us=953420 Windows version 6.2 (Windows 8 or greater) 64bit

Wed Jun 07 16:33:50 2017 us=953420 library versions: OpenSSL 1.0.2k 26 Jan 2017, LZO 2.10

<s>
Wed Jun 07 16:33:51 2017 us=828418 TCP/UDP: Preserving recently used remote address: [AF_INET]server.ip:11948

<s>
Wed Jun 07 16:33:51 2017 us=875295 [defaults] Peer Connection Initiated with [AF_INET]server.ip:11948

Wed Jun 07 16:33:53 2017 us=125353 MANAGEMENT: >STATE:1496849633,GET_CONFIG,,,,,,

Wed Jun 07 16:33:53 2017 us=125353 SENT CONTROL [defaults]: 'PUSH_REQUEST' (status=1)

Wed Jun 07 16:33:53 2017 us=125353 PUSH: Received control message: 'PUSH_REPLY,ping 10,ping-restart 30,route 10.8.0.1,ifconfig-ipv6 12fc:1918::10:8:0:110/112 12fc:1918::10:8:0:1,ifconfig 10.8.0.110 10.8.0.109,peer-id 0,cipher AES-256-GCM'

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: timers and/or timeouts modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: --ifconfig/up options modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: route options modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: peer-id set

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: adjusting link_mtu to 1625

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: data channel crypto options modified

<s>
Wed Jun 07 16:33:53 2017 us=125353 interactive service msg_channel=544

Wed Jun 07 16:33:53 2017 us=125353 ROUTE_GATEWAY 10.10.101.1/255.255.255.0 I=13 HWADDR=24:b6:fd:31:bc:ca

Wed Jun 07 16:33:53 2017 us=125353 open_tun

Wed Jun 07 16:33:53 2017 us=125353 TAP-WIN32 device [defc108] opened: \\.\Global\{AAFE414F-F176-40D4-9F66-2DA6AF175589}.tap

Wed Jun 07 16:33:53 2017 us=125353 TAP-Windows Driver Version 9.21

Wed Jun 07 16:33:53 2017 us=125353 TAP-Windows MTU=1500

Wed Jun 07 16:33:53 2017 us=125353 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.110/255.255.255.252 on interface {AAFE414F-F176-40D4-9F66-2DA6AF175589} [DHCP-serv: 10.8.0.109, lease-time: 31536000]

Wed Jun 07 16:33:53 2017 us=125353 DHCP option string: 2b060104 00000002

Wed Jun 07 16:33:53 2017 us=125353 Successful ARP Flush on interface [17] {AAFE414F-F176-40D4-9F66-2DA6AF175589}

Wed Jun 07 16:33:53 2017 us=125353 do_ifconfig, tt->did_ifconfig_ipv6_setup=1

Wed Jun 07 16:33:53 2017 us=125353 MANAGEMENT: >STATE:1496849633,ASSIGN_IP,,10.8.0.110,,,,,12fc:1918::10:8:0:110

Wed Jun 07 16:33:53 2017 us=125353 add_route_ipv6(12fc:1918::10:8:0:0/112 -> 12fc:1918::10:8:0:110 metric 0) dev defc108

Wed Jun 07 16:33:53 2017 us=125353 ROUTE: route addition failed using service: The object already exists. [status=5010 if_index=17]

Wed Jun 07 16:33:53 2017 us=125353 IPv6 route addition via service failed

Wed Jun 07 16:33:58 2017 us=969193 TEST ROUTES: 1/1 succeeded len=1 ret=1 a=0 u/d=up

Wed Jun 07 16:33:58 2017 us=969193 MANAGEMENT: >STATE:1496849638,ADD_ROUTES,,,,,,

Wed Jun 07 16:33:58 2017 us=969193 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.109

Wed Jun 07 16:33:58 2017 us=969193 Route addition via service succeeded

Wed Jun 07 16:33:58 2017 us=969193 Initialization Sequence Completed

Wed Jun 07 16:33:58 2017 us=969193 MANAGEMENT: >STATE:1496849638,CONNECTED,SUCCESS,10.8.0.110,server.ip,11948,,,12fc:1918::10:8:0:110

I am not quite sure why the route addition failed but there are *no* other VPNs running on the client, do not worry about it for this issue.

CLIENT IPCONFIG /ALL
====================

Windows IP Configuration

Host Name . . . . . . . . . . . . : ***

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : Yes

WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter defc108:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : TAP-Windows Adapter V9

Physical Address. . . . . . . . . : 00-FF-AA-FE-41-4F

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 12fc:1918::10:8:0:110(Preferred)

IPv6 Address. . . . . . . . . . . : 12fc:1918::10:36:101:110(Preferred)

Link-local IPv6 Address . . . . . :
fe80::ac09:1fad:3e4a:963d%17(Preferred)

IPv4 Address. . . . . . . . . . . : 10.8.0.110(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.255.252

Lease Obtained. . . . . . . . . . : 07 June 2017 16:33:53

Lease Expires . . . . . . . . . . : 07 June 2018 16:33:52

Default Gateway . . . . . . . . . :

DHCP Server . . . . . . . . . . . : 10.8.0.109

DHCPv6 IAID . . . . . . . . . . . : 83951530

DHCPv6 Client DUID. . . . . . . . :
00-01-00-01-19-BC-E7-9F-C0-18-85-79-69-A7

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

                                       fec0:0:0:ffff::2%1

                                       fec0:0:0:ffff::3%1

NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter Network Bridge:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Microsoft Network Adapter
Multiplexor Driver

Physical Address. . . . . . . . . : 24-B6-FD-31-BC-CA

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

IPv4 Address. . . . . . . . . . . : 10.10.101.111(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 10.10.101.1

DNS Servers . . . . . . . . . . . : 10.10.101.1

NetBIOS over Tcpip. . . . . . . . : Disabled

I have also attached a screenshot of wireshark on the client soliciting both addresses.

Notes:
Above the W10 config uses --dev-node defc108
The other config which would use the 12fc:1918::10:36:101:110 address
uses --dev-node tunc36 .. I don't know if/how that could be related.
There is no overlap in the two VPNs in either addresses or cert/keys or anything else that I am aware of. (Double checked many times)

If you require any further details please let me know.

Thanks

author
#1 lore raw

*bump*

Is there no explanation ?

Quoted 358 lines · On 07/06/17 17:41, debbie10t wrote:

Hi,

I have a basic setup and discovered that my W10 client was assigning a second IPv6 address to TAP even though it is *not* being pushed by the server. The second address is an old address from a server that I sometimes connect to. The server is still running but the client is not connected to it.

The most significant information here is that this *only* happens when using the openvpn-GUI + interactive-service.

When using the command prompt to run the W10 client manually the VPN is setup completely normally. Only the pushed address is used.

Below is the VPN which causes the strange behaviour.

SERVER (Linux Ubuntu .. The client connects to this)

conf
====
persist-key
persist-tun
client-to-client
;user nobody
;group nobody
verb 4
cd /etc/openvpn
dev tuns108
port 11948

server 10.8.0.0 255.255.255.0
server-ipv6 12fc:1918::10:8:0:0/112

client-config-dir defaults/ccd
ccd-exclusive

keepalive 10 30
comp-lzo no
push "comp-lzo no"
log defaults/108.log
management 127.0.0.1 11948

tls-auth
dh
ca
cert
key
====

CCD File (Verified that this file *is* used)
========

push-reset
push "ping 10"

       ping 10

push "ping-restart 30"
ping-restart 60
push "route 10.8.0.1"

ifconfig-push 10.8.0.110 10.8.0.109
ifconfig-ipv6-push 12fc:1918::10:8:0:110/112
=========

CLIENT (W 10.0.14393)

ovpn
====

dev-node defc108

dev-type tun

management 127.0.0.1 11948

resolv-retry infinite

client

explicit-exit-notify 3

reneg-sec 0

comp-lzo no

remote-cert-tls server

verb 4

remote ...
port 11948

proto udp

nobind

dhcp-option DISABLE-NBT

ca
cert
key
tls-auth
====

Most relevant parts of logs:

SERVER LOG
==========

Wed Jun  7 16:34:01 2017 us=552519 OpenVPN 2.5_git [git:master/07372a0fdeb36382] x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Feb 23 2017
Wed Jun  7 16:34:01 2017 us=552561 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
Wed Jun  7 16:34:01 2017 us=553657 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:11948
<s>
Wed Jun  7 16:34:01 2017 us=749800 ROUTE_GATEWAY 10.1.101.1/255.255.255.0 IFACE=eth0 HWADDR=00:30:1b:42:65:ac
Wed Jun  7 16:34:01 2017 us=750719 TUN/TAP device tuns108 opened
Wed Jun  7 16:34:01 2017 us=750798 TUN/TAP TX queue length set to 100
Wed Jun  7 16:34:01 2017 us=750854 do_ifconfig, tt->did_ifconfig_ipv6_setup=1
Wed Jun  7 16:34:01 2017 us=750916 /sbin/ifconfig tuns108 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Wed Jun  7 16:34:01 2017 us=756708 /sbin/ifconfig tuns108 add 12fc:1918::10:8:0:1/112
Wed Jun  7 16:34:01 2017 us=758869 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
<s>
Wed Jun  7 16:34:01 2017 us=760819 IFCONFIG POOL IPv6: (IPv4) size=62, size_ipv6=65536, netbits=112, base_ipv6=12fc:1918::10:8:0:1000
Wed Jun  7 16:34:01 2017 us=760843 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=1
Wed Jun  7 16:34:01 2017 us=760915 Initialization Sequence Completed
Wed Jun  7 16:34:32 2017 us=784338 MULTI: multi_create_instance called
Wed Jun  7 16:34:32 2017 us=784601 client.ip:3163 Re-using SSL/TLS context
<s>
Wed Jun  7 16:34:32 2017 us=785333 client.ip:3163 TLS: Initial packet from [AF_INET]client.ip:3163, sid=b26639a2 13444e2c
Wed Jun  7 16:34:32 2017 us=819223 client.ip:3163 VERIFY OK: depth=1, C=US, ST=California, L=San Francisco, O=Copyleft Certificate Co, OU=My Organizational Unit, CN=defaults, [email protected]...
Wed Jun  7 16:34:32 2017 us=820188 client.ip:3163 VERIFY OK: depth=0, C=US, ST=California, L=San Francisco, O=Copyleft Certificate Co, OU=My Organizational Unit, CN=defaultc01, [email protected]...
Wed Jun  7 16:34:32 2017 us=827342 client.ip:3163 peer info: IV_VER=2.4.2
Wed Jun  7 16:34:32 2017 us=827466 client.ip:3163 peer info: IV_PLAT=win
Wed Jun  7 16:34:32 2017 us=827507 client.ip:3163 peer info: IV_PROTO=2
Wed Jun  7 16:34:32 2017 us=827545 client.ip:3163 peer info: IV_NCP=2
Wed Jun  7 16:34:32 2017 us=827582 client.ip:3163 peer info: IV_LZ4=1
Wed Jun  7 16:34:32 2017 us=827629 client.ip:3163 peer info: IV_LZ4v2=1
Wed Jun  7 16:34:32 2017 us=827667 client.ip:3163 peer info: IV_LZO=1
Wed Jun  7 16:34:32 2017 us=827703 client.ip:3163 peer info: IV_COMP_STUB=1
Wed Jun  7 16:34:32 2017 us=827741 client.ip:3163 peer info: IV_COMP_STUBv2=1
Wed Jun  7 16:34:32 2017 us=827779 client.ip:3163 peer info: IV_TCPNL=1
Wed Jun  7 16:34:32 2017 us=827818 client.ip:3163 peer info: IV_GUI_VER=OpenVPN_GUI_11
<s>
Connection Initiated with [AF_INET]client.ip:3163
Wed Jun  7 16:34:32 2017 us=829379 defaultc01/client.ip:3163 OPTIONS IMPORT: reading client specific options from: defaults/ccd/defaultc01
Wed Jun  7 16:34:32 2017 us=830040 defaultc01/client.ip:3163 MULTI_sva: push_ifconfig_ipv6 12fc:1918::10:8:0:110/112
Wed Jun  7 16:34:32 2017 us=830334 defaultc01/client.ip:3163 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jun  7 16:34:32 2017 us=830384 defaultc01/client.ip:3163 MULTI: Learn: 10.8.0.110 -> defaultc01/client.ip:3163
Wed Jun  7 16:34:32 2017 us=830423 defaultc01/client.ip:3163 MULTI: primary virtual IP for defaultc01/client.ip:3163: 10.8.0.110
Wed Jun  7 16:34:32 2017 us=830465 defaultc01/client.ip:3163 MULTI: Learn: 12fc:1918::10:8:0:110 -> defaultc01/client.ip:3163
Wed Jun  7 16:34:32 2017 us=830505 defaultc01/client.ip:3163 MULTI: primary virtual IPv6 for defaultc01/client.ip:3163: 12fc:1918::10:8:0:110
Wed Jun  7 16:34:34 2017 us=70005 defaultc01/client.ip:3163 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun  7 16:34:34 2017 us=70294 defaultc01/client.ip:3163 SENT CONTROL [defaultc01]: 'PUSH_REPLY,ping 10,ping-restart 30,route 10.8.0.1,ifconfig-ipv6 12fc:1918::10:8:0:110/112 12fc:1918::10:8:0:1,ifconfig 10.8.0.110 10.8.0.109,peer-id 0,cipher AES-256-GCM' (status=1)
<s>
Wed Jun  7 16:34:34 2017 us=226401 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:34 2017 us=226531 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:34 2017 us=226617 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:35 2017 us=226119 defaultc01/client.ip:3163 MULTI: bad source address from client [12fc:1918::10:36:101:110], packet dropped

CLIENT LOG
==========

Wed Jun 07 16:33:50 2017 us=953420 OpenVPN 2.4.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on May 12 2017

Wed Jun 07 16:33:50 2017 us=953420 Windows version 6.2 (Windows 8 or greater) 64bit

Wed Jun 07 16:33:50 2017 us=953420 library versions: OpenSSL 1.0.2k 26 Jan 2017, LZO 2.10

<s>
Wed Jun 07 16:33:51 2017 us=828418 TCP/UDP: Preserving recently used remote address: [AF_INET]server.ip:11948

<s>
Wed Jun 07 16:33:51 2017 us=875295 [defaults] Peer Connection Initiated with [AF_INET]server.ip:11948

Wed Jun 07 16:33:53 2017 us=125353 MANAGEMENT:

Quoted 1 line

STATE:1496849633,GET_CONFIG,,,,,,

Wed Jun 07 16:33:53 2017 us=125353 SENT CONTROL [defaults]: 'PUSH_REQUEST' (status=1)

Wed Jun 07 16:33:53 2017 us=125353 PUSH: Received control message: 'PUSH_REPLY,ping 10,ping-restart 30,route 10.8.0.1,ifconfig-ipv6 12fc:1918::10:8:0:110/112 12fc:1918::10:8:0:1,ifconfig 10.8.0.110 10.8.0.109,peer-id 0,cipher AES-256-GCM'

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: timers and/or timeouts modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: --ifconfig/up options modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: route options modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: peer-id set

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: adjusting link_mtu to 1625

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: data channel crypto options modified

<s>
Wed Jun 07 16:33:53 2017 us=125353 interactive service msg_channel=544

Wed Jun 07 16:33:53 2017 us=125353 ROUTE_GATEWAY 10.10.101.1/255.255.255.0 I=13 HWADDR=24:b6:fd:31:bc:ca

Wed Jun 07 16:33:53 2017 us=125353 open_tun

Wed Jun 07 16:33:53 2017 us=125353 TAP-WIN32 device [defc108] opened: \\.\Global\{AAFE414F-F176-40D4-9F66-2DA6AF175589}.tap

Wed Jun 07 16:33:53 2017 us=125353 TAP-Windows Driver Version 9.21

Wed Jun 07 16:33:53 2017 us=125353 TAP-Windows MTU=1500

Wed Jun 07 16:33:53 2017 us=125353 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.110/255.255.255.252 on interface {AAFE414F-F176-40D4-9F66-2DA6AF175589} [DHCP-serv: 10.8.0.109, lease-time: 31536000]

Wed Jun 07 16:33:53 2017 us=125353 DHCP option string: 2b060104 00000002

Wed Jun 07 16:33:53 2017 us=125353 Successful ARP Flush on interface [17] {AAFE414F-F176-40D4-9F66-2DA6AF175589}

Wed Jun 07 16:33:53 2017 us=125353 do_ifconfig, tt->did_ifconfig_ipv6_setup=1

Wed Jun 07 16:33:53 2017 us=125353 MANAGEMENT:

Quoted 1 line

STATE:1496849633,ASSIGN_IP,,10.8.0.110,,,,,12fc:1918::10:8:0:110

Wed Jun 07 16:33:53 2017 us=125353 add_route_ipv6(12fc:1918::10:8:0:0/112 -> 12fc:1918::10:8:0:110 metric 0) dev defc108

Wed Jun 07 16:33:53 2017 us=125353 ROUTE: route addition failed using service: The object already exists. [status=5010 if_index=17]

Wed Jun 07 16:33:53 2017 us=125353 IPv6 route addition via service failed

Wed Jun 07 16:33:58 2017 us=969193 TEST ROUTES: 1/1 succeeded len=1 ret=1 a=0 u/d=up

Wed Jun 07 16:33:58 2017 us=969193 MANAGEMENT:

Quoted 1 line

STATE:1496849638,ADD_ROUTES,,,,,,

Wed Jun 07 16:33:58 2017 us=969193 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.109

Wed Jun 07 16:33:58 2017 us=969193 Route addition via service succeeded

Wed Jun 07 16:33:58 2017 us=969193 Initialization Sequence Completed

Wed Jun 07 16:33:58 2017 us=969193 MANAGEMENT:

Quoted 1 line

STATE:1496849638,CONNECTED,SUCCESS,10.8.0.110,server.ip,11948,,,12fc:1918::10:8:0:110

I am not quite sure why the route addition failed but there are *no* other VPNs running on the client, do not worry about it for this issue.

CLIENT IPCONFIG /ALL
====================

Windows IP Configuration

Host Name . . . . . . . . . . . . : ***

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : Yes

WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter defc108:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : TAP-Windows Adapter V9

Physical Address. . . . . . . . . : 00-FF-AA-FE-41-4F

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 12fc:1918::10:8:0:110(Preferred)

IPv6 Address. . . . . . . . . . . : 12fc:1918::10:36:101:110(Preferred)

Link-local IPv6 Address . . . . . :
fe80::ac09:1fad:3e4a:963d%17(Preferred)

    IPv4 Address. . . . . . . . . . . : 10.8.0.110(Preferred)

    Subnet Mask . . . . . . . . . . . : 255.255.255.252

    Lease Obtained. . . . . . . . . . : 07 June 2017 16:33:53

    Lease Expires . . . . . . . . . . : 07 June 2018 16:33:52

    Default Gateway . . . . . . . . . :

    DHCP Server . . . . . . . . . . . : 10.8.0.109

    DHCPv6 IAID . . . . . . . . . . . : 83951530

    DHCPv6 Client DUID. . . . . . . . : 

00-01-00-01-19-BC-E7-9F-C0-18-85-79-69-A7

    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

                                        fec0:0:0:ffff::2%1

                                        fec0:0:0:ffff::3%1

    NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter Network Bridge:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Microsoft Network Adapter
Multiplexor Driver

    Physical Address. . . . . . . . . : 24-B6-FD-31-BC-CA

    DHCP Enabled. . . . . . . . . . . : No

    Autoconfiguration Enabled . . . . : Yes

    IPv4 Address. . . . . . . . . . . : 10.10.101.111(Preferred)

    Subnet Mask . . . . . . . . . . . : 255.255.255.0

    Default Gateway . . . . . . . . . : 10.10.101.1

    DNS Servers . . . . . . . . . . . : 10.10.101.1

    NetBIOS over Tcpip. . . . . . . . : Disabled

I have also attached a screenshot of wireshark on the client soliciting both addresses.

Notes:
Above the W10 config uses --dev-node defc108
The other config which would use the 12fc:1918::10:36:101:110 address
uses --dev-node tunc36 .. I don't know if/how that could be related.
There is no overlap in the two VPNs in either addresses or cert/keys or anything else that I am aware of. (Double checked many times)

If you require any further details please let me know.

Thanks

#2 lore raw
Quoted 10 lines · On Wed, Jun 7, 2017 at 12:41 PM, debbie10t <[email protected]...> wrote:

Hi,

I have a basic setup and discovered that my W10 client was assigning a second IPv6 address to TAP even though it is *not* being pushed by the server. The second address is an old address from a server that I sometimes connect to. The server is still running but the client is not connected to it.

The most significant information here is that this *only* happens when using the openvpn-GUI + interactive-service.

Quoted 1 line · On Mon, Jun 12, 2017 at 10:28 AM, debbie10t <[email protected]...> wrote:

Is there no explanation ?

The service should delete the address when openvpn terminates so can't think of any reason why an old address would linger even if the same tap adapter was used for the previous connection.

Does this happen only on Win 10?

Wed Jun 07 16:33:53 2017 us=125353 ROUTE: route addition failed using

Quoted 1 line

service: The object already exists. [status=5010 if_index=17]

This is a known issue (route not deleted on termination so fails to recreate later) and is not a critical. FWIW, there is a patch on the ML to fix it.

Selva

author
#3 lore raw

Hi Selva, thanks for your answer.

Quoted 10 lines · Selva Nair
Quoted 8 lines · On Wed, Jun 7, 2017 at 12:41 PM, debbie10t <[email protected]...> wrote:

Hi,

I have a basic setup and discovered that my W10 client was assigning a second IPv6 address to TAP even though it is *not* being pushed by the server. The second address is an old address from a server that I sometimes connect to. The server is still running but the client is not connected to it.

Quoted 6 lines
Quoted 2 lines

The most significant information here is that this *only* happens when using the openvpn-GUI + interactive-service.

The service should delete the address when openvpn terminates so can't think of any reason why an old address would linger even if the same tap adapter was used for the previous connection.

I decided to try some tests .. in fact I only did one test. I rebooted the PC and now the second IP address has gone. (Windows Fast shutdown/reboot disabled .. so full reboot)

I also tried to recreate the problem but so far cannot ..
No changes have been made to my configs or host W10 pc ..
but I did realise that both configs in question *do* use the same TAP adapter .. connecting to each server in turn repeatedly did not recreate the problem .. and even doing crazy things one might do while under the influence did not recreate the problem. Even terminating via task manager could not recreate the problem ..

Chalk this one down to windows weirdness .. Just have to watch out if it ever happens again.

Quoted 1 line

Does this happen only on Win 10?

Only one time I have seen it and now can't recreate it.

Quoted 7 lines

Wed Jun 07 16:33:53 2017 us=125353 ROUTE: route addition failed using

Quoted 1 line

service: The object already exists. [status=5010 if_index=17]

This is a known issue (route not deleted on termination so fails to recreate later) and is not a critical. FWIW, there is a patch on the ML to fix it.

I'll keep an eye open for this.

Thanks

#4 lore raw

13 июн. 2017 г. 7:29 ПП пользователь "debbie10t" <[email protected]...> написал:

Hi Selva, thanks for your answer.

Quoted 14 lines · Selva Nair

On Wed, Jun 7, 2017 at 12:41 PM, debbie10t <[email protected]...> wrote:

Hi,

Quoted 10 lines

I have a basic setup and discovered that my W10 client was assigning a second IPv6 address to TAP even though it is *not* being pushed by the server. The second address is an old address from a server that I sometimes connect to. The server is still running but the client is not connected to it.

The most significant information here is that this *only* happens when using the openvpn-GUI + interactive-service.

The service should delete the address when openvpn terminates so can't

Quoted 3 lines

think of any reason why an old address would linger even if the same tap adapter was used for the previous connection.

I decided to try some tests .. in fact I only did one test. I rebooted the PC and now the second IP address has gone. (Windows Fast shutdown/reboot disabled .. so full reboot)

I also tried to recreate the problem but so far cannot ..

It might happen if openvpn dies without a chance of deleting associated ipv6 routes.

Try sysinternals utilities to kill it in such way.

Also, Samuli is developing openvpn test suite for windows, probably we should add some test like that

No changes have been made to my configs or host W10 pc ..
but I did realise that both configs in question *do* use the same TAP adapter .. connecting to each server in turn repeatedly did not recreate the problem .. and even doing crazy things one might do while under the influence did not recreate the problem. Even terminating via task manager could not recreate the problem ..

Chalk this one down to windows weirdness .. Just have to watch out if it ever happens again.

Does this happen only on Win 10?

Quoted 1 line

Only one time I have seen it and now can't recreate it.

Wed Jun 07 16:33:53 2017 us=125353 ROUTE: route addition failed using

Quoted 9 lines
Quoted 3 lines

service: The object already exists. [status=5010 if_index=17]

This is a known issue (route not deleted on termination so fails to recreate later) and is not a critical. FWIW, there is a patch on the ML to fix it.

I'll keep an eye open for this.

Thanks

------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#5 lore raw
Quoted 10 lines · Илья Шипицин

I decided to try some tests .. in fact I only did one test. I rebooted the PC and now the second IP address has gone. (Windows Fast shutdown/reboot disabled .. so full reboot)

I also tried to recreate the problem but so far cannot ..

It might happen if openvpn dies without a chance of deleting associated ipv6 routes.

Not if openvpn dies: interactive service will do the cleanup in that case. If the service dies, yes, the address will not be removed but even in that case address added to one interface cannot show up on another.

Selva

author
#14 lore raw
In reply to debbie10t

Rather astonishingly .. I can now reliably recreate the problem !!

As client:
Config-1 assigns 12fc:1918::10:36:101:110/112 to TAP (in tun mode) Config-2 assigns 12fc:1918::10:8:0:110/112 to TAP (in tun mode)

Following:

1. Administrator command prompt - execute openvp config-1.ovpn TAP is assigned 12fc:1918::10:36:101:110/112
2. Terminate by closing [X] the command prompt
3. Using GUI + Interactive-service start config-2.ovpn TAP is assigned 12fc:1918::10:36:101:110/112
& TAP is assigned 12fc:1918::10:8:0:110/112

Please try for yourself and post results.

I can post any further details if required.

Thanks

Quoted 358 lines · On 07/06/17 17:41, debbie10t wrote:

Hi,

I have a basic setup and discovered that my W10 client was assigning a second IPv6 address to TAP even though it is *not* being pushed by the server. The second address is an old address from a server that I sometimes connect to. The server is still running but the client is not connected to it.

The most significant information here is that this *only* happens when using the openvpn-GUI + interactive-service.

When using the command prompt to run the W10 client manually the VPN is setup completely normally. Only the pushed address is used.

Below is the VPN which causes the strange behaviour.

SERVER (Linux Ubuntu .. The client connects to this)

conf
====
persist-key
persist-tun
client-to-client
;user nobody
;group nobody
verb 4
cd /etc/openvpn
dev tuns108
port 11948

server 10.8.0.0 255.255.255.0
server-ipv6 12fc:1918::10:8:0:0/112

client-config-dir defaults/ccd
ccd-exclusive

keepalive 10 30
comp-lzo no
push "comp-lzo no"
log defaults/108.log
management 127.0.0.1 11948

tls-auth
dh
ca
cert
key
====

CCD File (Verified that this file *is* used)
========

push-reset
push "ping 10"

       ping 10

push "ping-restart 30"
ping-restart 60
push "route 10.8.0.1"

ifconfig-push 10.8.0.110 10.8.0.109
ifconfig-ipv6-push 12fc:1918::10:8:0:110/112
=========

CLIENT (W 10.0.14393)

ovpn
====

dev-node defc108

dev-type tun

management 127.0.0.1 11948

resolv-retry infinite

client

explicit-exit-notify 3

reneg-sec 0

comp-lzo no

remote-cert-tls server

verb 4

remote ...
port 11948

proto udp

nobind

dhcp-option DISABLE-NBT

ca
cert
key
tls-auth
====

Most relevant parts of logs:

SERVER LOG
==========

Wed Jun  7 16:34:01 2017 us=552519 OpenVPN 2.5_git [git:master/07372a0fdeb36382] x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Feb 23 2017
Wed Jun  7 16:34:01 2017 us=552561 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
Wed Jun  7 16:34:01 2017 us=553657 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:11948
<s>
Wed Jun  7 16:34:01 2017 us=749800 ROUTE_GATEWAY 10.1.101.1/255.255.255.0 IFACE=eth0 HWADDR=00:30:1b:42:65:ac
Wed Jun  7 16:34:01 2017 us=750719 TUN/TAP device tuns108 opened
Wed Jun  7 16:34:01 2017 us=750798 TUN/TAP TX queue length set to 100
Wed Jun  7 16:34:01 2017 us=750854 do_ifconfig, tt->did_ifconfig_ipv6_setup=1
Wed Jun  7 16:34:01 2017 us=750916 /sbin/ifconfig tuns108 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Wed Jun  7 16:34:01 2017 us=756708 /sbin/ifconfig tuns108 add 12fc:1918::10:8:0:1/112
Wed Jun  7 16:34:01 2017 us=758869 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
<s>
Wed Jun  7 16:34:01 2017 us=760819 IFCONFIG POOL IPv6: (IPv4) size=62, size_ipv6=65536, netbits=112, base_ipv6=12fc:1918::10:8:0:1000
Wed Jun  7 16:34:01 2017 us=760843 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=1
Wed Jun  7 16:34:01 2017 us=760915 Initialization Sequence Completed
Wed Jun  7 16:34:32 2017 us=784338 MULTI: multi_create_instance called
Wed Jun  7 16:34:32 2017 us=784601 client.ip:3163 Re-using SSL/TLS context
<s>
Wed Jun  7 16:34:32 2017 us=785333 client.ip:3163 TLS: Initial packet from [AF_INET]client.ip:3163, sid=b26639a2 13444e2c
Wed Jun  7 16:34:32 2017 us=819223 client.ip:3163 VERIFY OK: depth=1, C=US, ST=California, L=San Francisco, O=Copyleft Certificate Co, OU=My Organizational Unit, CN=defaults, [email protected]...
Wed Jun  7 16:34:32 2017 us=820188 client.ip:3163 VERIFY OK: depth=0, C=US, ST=California, L=San Francisco, O=Copyleft Certificate Co, OU=My Organizational Unit, CN=defaultc01, [email protected]...
Wed Jun  7 16:34:32 2017 us=827342 client.ip:3163 peer info: IV_VER=2.4.2
Wed Jun  7 16:34:32 2017 us=827466 client.ip:3163 peer info: IV_PLAT=win
Wed Jun  7 16:34:32 2017 us=827507 client.ip:3163 peer info: IV_PROTO=2
Wed Jun  7 16:34:32 2017 us=827545 client.ip:3163 peer info: IV_NCP=2
Wed Jun  7 16:34:32 2017 us=827582 client.ip:3163 peer info: IV_LZ4=1
Wed Jun  7 16:34:32 2017 us=827629 client.ip:3163 peer info: IV_LZ4v2=1
Wed Jun  7 16:34:32 2017 us=827667 client.ip:3163 peer info: IV_LZO=1
Wed Jun  7 16:34:32 2017 us=827703 client.ip:3163 peer info: IV_COMP_STUB=1
Wed Jun  7 16:34:32 2017 us=827741 client.ip:3163 peer info: IV_COMP_STUBv2=1
Wed Jun  7 16:34:32 2017 us=827779 client.ip:3163 peer info: IV_TCPNL=1
Wed Jun  7 16:34:32 2017 us=827818 client.ip:3163 peer info: IV_GUI_VER=OpenVPN_GUI_11
<s>
Connection Initiated with [AF_INET]client.ip:3163
Wed Jun  7 16:34:32 2017 us=829379 defaultc01/client.ip:3163 OPTIONS IMPORT: reading client specific options from: defaults/ccd/defaultc01
Wed Jun  7 16:34:32 2017 us=830040 defaultc01/client.ip:3163 MULTI_sva: push_ifconfig_ipv6 12fc:1918::10:8:0:110/112
Wed Jun  7 16:34:32 2017 us=830334 defaultc01/client.ip:3163 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jun  7 16:34:32 2017 us=830384 defaultc01/client.ip:3163 MULTI: Learn: 10.8.0.110 -> defaultc01/client.ip:3163
Wed Jun  7 16:34:32 2017 us=830423 defaultc01/client.ip:3163 MULTI: primary virtual IP for defaultc01/client.ip:3163: 10.8.0.110
Wed Jun  7 16:34:32 2017 us=830465 defaultc01/client.ip:3163 MULTI: Learn: 12fc:1918::10:8:0:110 -> defaultc01/client.ip:3163
Wed Jun  7 16:34:32 2017 us=830505 defaultc01/client.ip:3163 MULTI: primary virtual IPv6 for defaultc01/client.ip:3163: 12fc:1918::10:8:0:110
Wed Jun  7 16:34:34 2017 us=70005 defaultc01/client.ip:3163 PUSH: Received control message: 'PUSH_REQUEST'
Wed Jun  7 16:34:34 2017 us=70294 defaultc01/client.ip:3163 SENT CONTROL [defaultc01]: 'PUSH_REPLY,ping 10,ping-restart 30,route 10.8.0.1,ifconfig-ipv6 12fc:1918::10:8:0:110/112 12fc:1918::10:8:0:1,ifconfig 10.8.0.110 10.8.0.109,peer-id 0,cipher AES-256-GCM' (status=1)
<s>
Wed Jun  7 16:34:34 2017 us=226401 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:34 2017 us=226531 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:34 2017 us=226617 defaultc01/client.ip:3163 MULTI: bad source address from client [::], packet dropped
Wed Jun  7 16:34:35 2017 us=226119 defaultc01/client.ip:3163 MULTI: bad source address from client [12fc:1918::10:36:101:110], packet dropped

CLIENT LOG
==========

Wed Jun 07 16:33:50 2017 us=953420 OpenVPN 2.4.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on May 12 2017

Wed Jun 07 16:33:50 2017 us=953420 Windows version 6.2 (Windows 8 or greater) 64bit

Wed Jun 07 16:33:50 2017 us=953420 library versions: OpenSSL 1.0.2k 26 Jan 2017, LZO 2.10

<s>
Wed Jun 07 16:33:51 2017 us=828418 TCP/UDP: Preserving recently used remote address: [AF_INET]server.ip:11948

<s>
Wed Jun 07 16:33:51 2017 us=875295 [defaults] Peer Connection Initiated with [AF_INET]server.ip:11948

Wed Jun 07 16:33:53 2017 us=125353 MANAGEMENT:

Quoted 1 line

STATE:1496849633,GET_CONFIG,,,,,,

Wed Jun 07 16:33:53 2017 us=125353 SENT CONTROL [defaults]: 'PUSH_REQUEST' (status=1)

Wed Jun 07 16:33:53 2017 us=125353 PUSH: Received control message: 'PUSH_REPLY,ping 10,ping-restart 30,route 10.8.0.1,ifconfig-ipv6 12fc:1918::10:8:0:110/112 12fc:1918::10:8:0:1,ifconfig 10.8.0.110 10.8.0.109,peer-id 0,cipher AES-256-GCM'

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: timers and/or timeouts modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: --ifconfig/up options modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: route options modified

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: peer-id set

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: adjusting link_mtu to 1625

Wed Jun 07 16:33:53 2017 us=125353 OPTIONS IMPORT: data channel crypto options modified

<s>
Wed Jun 07 16:33:53 2017 us=125353 interactive service msg_channel=544

Wed Jun 07 16:33:53 2017 us=125353 ROUTE_GATEWAY 10.10.101.1/255.255.255.0 I=13 HWADDR=24:b6:fd:31:bc:ca

Wed Jun 07 16:33:53 2017 us=125353 open_tun

Wed Jun 07 16:33:53 2017 us=125353 TAP-WIN32 device [defc108] opened: \\.\Global\{AAFE414F-F176-40D4-9F66-2DA6AF175589}.tap

Wed Jun 07 16:33:53 2017 us=125353 TAP-Windows Driver Version 9.21

Wed Jun 07 16:33:53 2017 us=125353 TAP-Windows MTU=1500

Wed Jun 07 16:33:53 2017 us=125353 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.110/255.255.255.252 on interface {AAFE414F-F176-40D4-9F66-2DA6AF175589} [DHCP-serv: 10.8.0.109, lease-time: 31536000]

Wed Jun 07 16:33:53 2017 us=125353 DHCP option string: 2b060104 00000002

Wed Jun 07 16:33:53 2017 us=125353 Successful ARP Flush on interface [17] {AAFE414F-F176-40D4-9F66-2DA6AF175589}

Wed Jun 07 16:33:53 2017 us=125353 do_ifconfig, tt->did_ifconfig_ipv6_setup=1

Wed Jun 07 16:33:53 2017 us=125353 MANAGEMENT:

Quoted 1 line

STATE:1496849633,ASSIGN_IP,,10.8.0.110,,,,,12fc:1918::10:8:0:110

Wed Jun 07 16:33:53 2017 us=125353 add_route_ipv6(12fc:1918::10:8:0:0/112 -> 12fc:1918::10:8:0:110 metric 0) dev defc108

Wed Jun 07 16:33:53 2017 us=125353 ROUTE: route addition failed using service: The object already exists. [status=5010 if_index=17]

Wed Jun 07 16:33:53 2017 us=125353 IPv6 route addition via service failed

Wed Jun 07 16:33:58 2017 us=969193 TEST ROUTES: 1/1 succeeded len=1 ret=1 a=0 u/d=up

Wed Jun 07 16:33:58 2017 us=969193 MANAGEMENT:

Quoted 1 line

STATE:1496849638,ADD_ROUTES,,,,,,

Wed Jun 07 16:33:58 2017 us=969193 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.109

Wed Jun 07 16:33:58 2017 us=969193 Route addition via service succeeded

Wed Jun 07 16:33:58 2017 us=969193 Initialization Sequence Completed

Wed Jun 07 16:33:58 2017 us=969193 MANAGEMENT:

Quoted 1 line

STATE:1496849638,CONNECTED,SUCCESS,10.8.0.110,server.ip,11948,,,12fc:1918::10:8:0:110

I am not quite sure why the route addition failed but there are *no* other VPNs running on the client, do not worry about it for this issue.

CLIENT IPCONFIG /ALL
====================

Windows IP Configuration

Host Name . . . . . . . . . . . . : ***

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : Yes

WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter defc108:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : TAP-Windows Adapter V9

Physical Address. . . . . . . . . : 00-FF-AA-FE-41-4F

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 12fc:1918::10:8:0:110(Preferred)

IPv6 Address. . . . . . . . . . . : 12fc:1918::10:36:101:110(Preferred)

Link-local IPv6 Address . . . . . :
fe80::ac09:1fad:3e4a:963d%17(Preferred)

    IPv4 Address. . . . . . . . . . . : 10.8.0.110(Preferred)

    Subnet Mask . . . . . . . . . . . : 255.255.255.252

    Lease Obtained. . . . . . . . . . : 07 June 2017 16:33:53

    Lease Expires . . . . . . . . . . : 07 June 2018 16:33:52

    Default Gateway . . . . . . . . . :

    DHCP Server . . . . . . . . . . . : 10.8.0.109

    DHCPv6 IAID . . . . . . . . . . . : 83951530

    DHCPv6 Client DUID. . . . . . . . : 

00-01-00-01-19-BC-E7-9F-C0-18-85-79-69-A7

    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

                                        fec0:0:0:ffff::2%1

                                        fec0:0:0:ffff::3%1

    NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter Network Bridge:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Microsoft Network Adapter
Multiplexor Driver

    Physical Address. . . . . . . . . : 24-B6-FD-31-BC-CA

    DHCP Enabled. . . . . . . . . . . : No

    Autoconfiguration Enabled . . . . : Yes

    IPv4 Address. . . . . . . . . . . : 10.10.101.111(Preferred)

    Subnet Mask . . . . . . . . . . . : 255.255.255.0

    Default Gateway . . . . . . . . . : 10.10.101.1

    DNS Servers . . . . . . . . . . . : 10.10.101.1

    NetBIOS over Tcpip. . . . . . . . : Disabled

I have also attached a screenshot of wireshark on the client soliciting both addresses.

Notes:
Above the W10 config uses --dev-node defc108
The other config which would use the 12fc:1918::10:36:101:110 address
uses --dev-node tunc36 .. I don't know if/how that could be related.
There is no overlap in the two VPNs in either addresses or cert/keys or anything else that I am aware of. (Double checked many times)

If you require any further details please let me know.

Thanks

#6 lore raw
In reply to Selva Nair

2017-06-13 23:00 GMT+05:00 Selva Nair <[email protected]...>:

Quoted 11 lines
Quoted 7 lines · Илья Шипицин

I decided to try some tests .. in fact I only did one test. I rebooted the PC and now the second IP address has gone. (Windows Fast shutdown/reboot disabled .. so full reboot)

I also tried to recreate the problem but so far cannot ..

Quoted 8 lines
Quoted 3 lines

It might happen if openvpn dies without a chance of deleting associated ipv6 routes.

Not if openvpn dies: interactive service will do the cleanup in that case. If the service dies, yes, the address will not be removed but even in that case address added to one interface cannot show up on another.

if user is administrator, interactive service is not used. well, I did miss that about interactive service.

Quoted 3 lines

Selva

#15 lore raw
In reply to debbie10t

HI,

Quoted 13 lines · On Tue, Jun 13, 2017 at 07:01:22PM +0100, debbie10t wrote:

Rather astonishingly .. I can now reliably recreate the problem !!

As client:

    Config-1 assigns 12fc:1918::10:36:101:110/112 to TAP (in tun mode)
    Config-2 assigns 12fc:1918::10:8:0:110/112 to TAP (in tun mode)

Following:

1. Administrator command prompt - execute openvp config-1.ovpn

    TAP is assigned 12fc:1918::10:36:101:110/112
2. Terminate by closing [X] the command prompt
3. Using GUI + Interactive-service start config-2.ovpn
    TAP is assigned 12fc:1918::10:36:101:110/112
Quoted 5 lines

& TAP is assigned 12fc:1918::10:8:0:110/112

Please try for yourself and post results.

I can post any further details if required.

I'd like to see openvpn logs with --verb 4 of both cases.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#16 lore raw
In reply to debbie10t
Quoted 6 lines · On Tue, Jun 13, 2017 at 2:01 PM, debbie10t <[email protected]...> wrote:

As client:
Config-1 assigns 12fc:1918::10:36:101:110/112 to TAP (in tun mode) Config-2 assigns 12fc:1918::10:8:0:110/112 to TAP (in tun mode)

Following:

Quoted 9 lines

1. Administrator command prompt - execute openvp config-1.ovpn TAP is assigned 12fc:1918::10:36:101:110/112
2. Terminate by closing [X] the command prompt
3. Using GUI + Interactive-service start config-2.ovpn TAP is assigned 12fc:1918::10:36:101:110/112
& TAP is assigned 12fc:1918::10:8:0:110/112

Please try for yourself and post results.

I haven't tested this, but if both connections use the same adapter, this looks possible as you kill the first process without giving it a chance to remove the IP first. Addresses are added with store=active so would disappear on reboot as you saw.

Selva

#17 lore raw

Hi,

Quoted 3 lines · Selva Nair
Quoted 3 lines

1. Administrator command prompt - execute openvp config-1.ovpn TAP is assigned 12fc:1918::10:36:101:110/112
2. Terminate by closing [X] the command prompt

[..]

Quoted 5 lines

I haven't tested this, but if both connections use the same adapter, this looks possible as you kill the first process without giving it a chance to remove the IP first. Addresses are added with store=active so would disappear on reboot as you saw.

Right. If you a) run as admin, and b) force-kill openvpn (which "close the command window" might do), yes, there is no way to clean up.

In that case, it's just plain PEBKAC :-)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#18 lore raw
Quoted 10 lines · Gert Doering
Quoted 2 lines

I haven't tested this, but if both connections use the same adapter, this looks possible as you kill the first process without giving it a chance

to

Quoted 2 lines

remove the IP first. Addresses are added with store=active so would disappear on reboot as you saw.

Right. If you a) run as admin, and b) force-kill openvpn (which "close the command window" might do), yes, there is no way to clean up.

In that case, it's just plain PEBKAC :-)

Right :) But we could probably do better using Set instead of Add while the address is set using the service. I'm not that familiar with ipapi, but looks like SetUnicastIpAddressEnrty instead of AddUnicastIpAddressEntry may be the right thing.

The netsh command used when service is not in use does correctly do a set not add.

Selva

#19 lore raw

Hi,

Quoted 7 lines · Selva Nair

Right :) But we could probably do better using Set instead of Add while the address is set using the service. I'm not that familiar with ipapi, but looks like SetUnicastIpAddressEnrty instead of AddUnicastIpAddressEntry may be the right thing.

The netsh command used when service is not in use does correctly do a set not add.

Good point. Wouldn't solve the first problem, but at least a subsequent run would "magically fix it", provided the same tap interface is used (which, I think, is the case in the great majority of windows installations)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#20 lore raw
Quoted 8 lines · Gert Doering

Hi,

Quoted 5 lines · Selva Nair

Right :) But we could probably do better using Set instead of Add while the address is set using the service. I'm not that familiar with ipapi, but looks like SetUnicastIpAddressEnrty instead of AddUnicastIpAddressEntry may be the right thing.

Quoted 9 lines
Quoted 2 lines

The netsh command used when service is not in use does correctly do a set not add.

Good point. Wouldn't solve the first problem, but at least a subsequent run would "magically fix it", provided the same tap interface is used (which, I think, is the case in the great majority of windows installations)

gert

Hi,

If I'm not mistaken, this is the same or related problem to the one I reported early on in 2.4.x release cycle. There might actually be a Trac ticket for it.

I encountered the issue with the Powershell test suite (openvpn-windows-test) which ran through a bunch of t_client test configs and forcibly killed the OpenVPN process at the end of each test. All ping6 tests except the first one would then fail, because adding a default IPv6 route failed as one existed already.

If you want I can dig up the Trac ticket number later.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
#7 lore raw
In reply to Илья Шипицин
Quoted 6 lines

if user is administrator, interactive service is not used. well, I did miss that about interactive service.

I wonder we should always use the interactive service if available and add (dont-use-interactive) option, so behaviour is always the same.

Arne

#8 lore raw
Quoted 8 lines · Arne Schwabe
Quoted 5 lines

if user is administrator, interactive service is not used. well, I did miss that about interactive service.

I wonder we should always use the interactive service if available and add (dont-use-interactive) option, so behaviour is always the same.

This was done for security -- some Windows versions have broken handling of passing credentials through named pipe which could be used for privilege escalation. I have seen this exploit work only on Windows XP[*], but to be cautious we opted not to allow openvpn running as admin connect to the service pipe.

But anyway, in this case its the service that's doing the wrong thing.

Selva

[*] On XP, a rogue program running as user can gain admin rights if a program running as admin connects to it through a named pipe.

#22 lore raw
In reply to Gert Doering
Quoted 7 lines · Gert Doering
Quoted 2 lines · Selva Nair

Right :) But we could probably do better using Set instead of Add while the address is set using the service. I'm not that familiar with ipapi,

but

Quoted 3 lines

looks like SetUnicastIpAddressEnrty instead of AddUnicastIpAddressEntry may be the right thing.

Quoted 7 lines
Quoted 2 lines

The netsh command used when service is not in use does correctly do a set not add.

Good point. Wouldn't solve the first problem, but at least a subsequent run would "magically fix it", provided the same tap interface is used (which, I think, is the case in the great majority of windows installations)

Okay, I can say that the issue is indeed the service effectively doing an "add address" instead
of "set address". Reproduced this without using an admin run:

1. Connect to server 1 using GUI/iservice
2. Kill iservice using taskmanager or taskkill (do not do sc stop service-name.. as that will do a graceful stop)
3. Start the service again
4. Disconnect from server 1
At this point "netsh int ipv6 show addr" will show that v6 addres is retained although the connection is down
4. connect to server 2 using GUI/iservice

Now the adapter will have two ipv6 addresses.

Quoted 5 lines · Samuli Seppänen

I encountered the issue with the Powershell test suite (openvpn-windows-test) which ran through a bunch of t_client test configs and forcibly killed the OpenVPN process at the end of each test. All ping6 tests except the first one would then fail, because adding a default IPv6 route failed as one existed already.

Probably the same issue. The real culprit here is force-killing without impunity. I'll be posting a PR to the GUI that allows sending connect, disconnect and exit commands to the running GUI, so we could use that in the script. That said using "set address" in the service will mitigate this to some extent -- looks easy to do a patch..

Selva

#9 lore raw
In reply to Selva Nair

2017-06-14 1:05 GMT+05:00 Selva Nair <[email protected]...>:

Quoted 13 lines · Arne Schwabe
Quoted 9 lines
Quoted 6 lines

if user is administrator, interactive service is not used. well, I did miss that about interactive service.

I wonder we should always use the interactive service if available and add (dont-use-interactive) option, so behaviour is always the same.

Quoted 8 lines

This was done for security -- some Windows versions have broken handling of passing credentials through named pipe which could be used for privilege escalation. I have seen this exploit work only on Windows XP[*], but to be cautious we opted not to allow openvpn running as admin connect to the service pipe.

But anyway, in this case its the service that's doing the wrong thing.

well, I'm lost here.

sounds like "we do not use interactive service if user is already an administrator ... due to possible privilege escalation", right ? escalation to "system" ?

Quoted 6 lines

Selva

[*] On XP, a rogue program running as user can gain admin rights if a program running as admin connects to it through a named pipe.

#10 lore raw
Quoted 21 lines · Илья Шипицин

2017-06-14 1:05 GMT+05:00 Selva Nair <[email protected]...>:

Quoted 19 lines · Arne Schwabe
Quoted 9 lines
Quoted 6 lines

if user is administrator, interactive service is not used. well, I did miss that about interactive service.

I wonder we should always use the interactive service if available and add (dont-use-interactive) option, so behaviour is always the same.

This was done for security -- some Windows versions have broken handling of passing credentials through named pipe which could be used for privilege escalation. I have seen this exploit work only on Windows XP[*], but to be cautious we opted not to allow openvpn running as admin connect to the service pipe.

Quoted 9 lines
Quoted 2 lines

But anyway, in this case its the service that's doing the wrong thing.

well, I'm lost here.

sounds like "we do not use interactive service if user is already an administrator ... due to possible privilege escalation", right ? escalation to "system" ?

No, just escalation from user to admin. Think of a system where iservice is not running. A user could start a rogue process in the background that listens on the service pipe. This is easily done do as the service pipe uses a fixed name and no authentication is needed to connect to it. Then an admin who starts the GUI will connect to the pipe and let the rogue program gain admin rights. It takes only a few line sof code to exploit this on XP -- I have not been able to exploit this on Vista but not 100% sure it has been fixed for good on Vista+.

For more details see, for example,
https://labs.portcullis.co.uk/blog/windows-named-pipes-there-and-back-again/

Selva

#11 lore raw

2017-06-14 1:51 GMT+05:00 Selva Nair <[email protected]...>:

Quoted 35 lines
Quoted 21 lines · Илья Шипицин

2017-06-14 1:05 GMT+05:00 Selva Nair <[email protected]...>:

Quoted 19 lines · Arne Schwabe
Quoted 9 lines
Quoted 6 lines

if user is administrator, interactive service is not used. well, I did miss that about interactive service.

I wonder we should always use the interactive service if available and add (dont-use-interactive) option, so behaviour is always the same.

This was done for security -- some Windows versions have broken handling of passing credentials through named pipe which could be used for privilege escalation. I have seen this exploit work only on Windows XP[*], but to be cautious we opted not to allow openvpn running as admin connect to the service pipe.

Quoted 9 lines
Quoted 2 lines

But anyway, in this case its the service that's doing the wrong thing.

well, I'm lost here.

sounds like "we do not use interactive service if user is already an administrator ... due to possible privilege escalation", right ? escalation to "system" ?

Quoted 9 lines

No, just escalation from user to admin. Think of a system where iservice is not running. A user could start a rogue process in the background that listens on the service pipe. This is easily done do as the service pipe uses a fixed name and no authentication is needed to connect to it. Then an admin who starts the GUI will connect to the pipe and let the rogue program gain admin rights. It takes only a few line sof code to exploit this on XP -- I have not been able to exploit this on Vista but not 100% sure it has been fixed for good on Vista+.

I think it worth being added as a comment (or even as a unit test) to openvpn-gui

Quoted 6 lines

For more details see, for example, https://labs.
portcullis.co.uk/blog/windows-named-pipes-there-and-back-again/

Selva

#12 lore raw
In reply to Selva Nair
Quoted 3 lines · Selva Nair

It takes only a few line sof code to exploit this on XP -- I have not been able to exploit this on Vista but not 100% sure it has been fixed for good on Vista+.

But do we really care much for anything older than Win7 these days? For v2.3, perhaps yes - but v2.4 is the one introducing the interactive service.

WindowsXP (and Vista) are old, even unsupported by Microsoft (well, mostly - they added a highly critical IE fix this week, but generally it is dead). So my opinion is that anything related to OpenVPN v2.4 and newer on Windows versions older than Win7 can just burn and we'll happily just observe it.

But at some point we will need to pull the WinXP/Vista support plug for v2.3 and older too. Like we did with Win2K a long time ago too.

Signature · 4 lines
kind regards,

David Sommerseth
OpenVPN Technologies, Inc
author
#21 lore raw
In reply to Samuli Seppänen
Quoted 6 lines · Samuli Seppänen

Hi,

If I'm not mistaken, this is the same or related problem to the one I reported early on in 2.4.x release cycle. There might actually be a Trac ticket for it.

Quoted 8 lines

I encountered the issue with the Powershell test suite (openvpn-windows-test) which ran through a bunch of t_client test configs and forcibly killed the OpenVPN process at the end of each test. All ping6 tests except the first one would then fail, because adding a default IPv6 route failed as one existed already.

If you want I can dig up the Trac ticket number later.

Looks like this one:
https://community.openvpn.net/openvpn/ticket/771

#13 lore raw
In reply to David Sommerseth
Quoted 8 lines · David Sommerseth
Quoted 3 lines · Selva Nair

It takes only a few line sof code to exploit this on XP -- I have not been able to exploit this on Vista but not 100% sure it has been fixed for good on Vista+.

But do we really care much for anything older than Win7 these days? For v2.3, perhaps yes - but v2.4 is the one introducing the interactive service.

Even so, I think its still prudent to err on the side of caution and not allow a client running as admin hand out impersonation rights to a server it connects to, unless some authentication could be put in place.

Note: Here client is the GUI and server is anything that listens on the service named pipe --- which is normally the service, but could be a rogue program. I'm being paranoid, and impersonation via named pipe is probably secure in recent versions of Windows.

If the GUI is running as admin, so will openvpn and it then doesn't need the service for any tasks. So no functionality is lost by not using the service. However, running the GUI as admin is not a good idea, so a better way would be to check whether iservice is available and if so drop privileges and proceed. That way openvpn will also run with limited privileges.

Indeed it would ease code maintenance if we can drop the numerous ways of setting routes etc. and exclusively use the service. Until that becomes acceptable, the use of iservice while admin brings in little benefit, if any.

Selva

author
#23 lore raw
In reply to Selva Nair
Quoted 42 lines · Selva Nair
Quoted 7 lines · Gert Doering
Quoted 2 lines · Selva Nair

Right :) But we could probably do better using Set instead of Add while the address is set using the service. I'm not that familiar with ipapi,

but

Quoted 3 lines

looks like SetUnicastIpAddressEnrty instead of AddUnicastIpAddressEntry may be the right thing.

Quoted 7 lines
Quoted 2 lines

The netsh command used when service is not in use does correctly do a set not add.

Good point. Wouldn't solve the first problem, but at least a subsequent run would "magically fix it", provided the same tap interface is used (which, I think, is the case in the great majority of windows installations)

Okay, I can say that the issue is indeed the service effectively doing an "add address" instead
of "set address". Reproduced this without using an admin run:

1. Connect to server 1 using GUI/iservice
2. Kill iservice using taskmanager or taskkill (do not do sc stop service-name.. as that will do a graceful stop)
3. Start the service again
4. Disconnect from server 1
At this point "netsh int ipv6 show addr" will show that v6 addres is retained although the connection is down
4. connect to server 2 using GUI/iservice

Now the adapter will have two ipv6 addresses.

Quoted 5 lines · Samuli Seppänen

I encountered the issue with the Powershell test suite (openvpn-windows-test) which ran through a bunch of t_client test configs and forcibly killed the OpenVPN process at the end of each test. All ping6 tests except the first one would then fail, because adding a default IPv6 route failed as one existed already.

Quoted 6 lines

Probably the same issue. The real culprit here is force-killing without impunity. I'll be posting a PR to the GUI that allows sending connect, disconnect and exit commands to the running GUI, so we could use that in the script. That said using "set address" in the service will mitigate this to some extent -- looks easy to do a patch..

PEBKAC's aside .. +1 to 'set not add'