Page 2 of 3

Re: Viscosity Port Forwarding Applescript

Posted: Tue Nov 29, 2016 7:22 pm
by James
Hi SpookyCow,

I'm afraid there isn't much else we can offer in the way of support or suggestions. Scripting is definitely working in the latest version of Viscosity - we've repeatedly tested on a number of machines here just to be sure. My suggestion would be to use the scripts attached to this post to confirm the scripts are indeed being executed (you should see a pop-up dialog when each is run) for your connection. Please make sure you use Viscosity to set the scripts for your connection - they should not be copied into place manually.

As for the content of your scripts, I'm afraid we can't offer any support for that. I suggest getting in touch with the original author/s. It's quite likely they no longer work as intended, but that's likely due to something else (such as your VPN Provider changing the method or API controlling port forwarding, obsolete AppleScript calls or syntax, etc.).

Cheers,
James

Re: Viscosity Port Forwarding Applescript

Posted: Fri Dec 02, 2016 2:40 am
by SpookyCow
James,

I tested your sample scripts and they do indeed work properly.
And I haven't pasted the scripts, they were selected through the Viscosity dialog boxes.
But, when I run the scripts manually, they work just fine. It's a very odd issue. But, I haven't changed anything to the scripts and had them in there since using Viscosity, the problem just started happening with the 1.6.x builds. *shrug*

SpookyCow

Re: Viscosity Port Forwarding Applescript

Posted: Fri Dec 02, 2016 6:11 am
by SpookyCow
James,

I went ahead and upgraded to 10.12.1 and then modified the AppleScript from utun0 to utun1 and now it works perfectly.

Sorry for all the trouble.

SpookyCow

Re: Viscosity Port Forwarding Applescript

Posted: Sat Dec 03, 2016 2:21 pm
by SpookyCow
Now I'm getting frequent disconnects:
Code: Select all
Dec 02 20:47:35: Viscosity Mac 1.6.8b1 (1365)
Dec 02 20:47:35: Viscosity OpenVPN Engine Started
Dec 02 20:47:35: Running on Mac OS X 10.12.1
Dec 02 20:47:35: ---------
Dec 02 20:47:35: Checking reachability status of connection...
Dec 02 20:47:35: Connection is reachable. Starting connection attempt.
Dec 02 20:47:36: OpenVPN 2.3.13 x86_64-apple-darwin [SSL (OpenSSL)] [LZO] [PKCS11] [MH] [IPv6] built on Nov  4 2016
Dec 02 20:47:36: library versions: OpenSSL 1.0.2j  26 Sep 2016, LZO 2.09
Dec 02 20:47:39: UDPv4 link local: [undef]
Dec 02 20:47:39: UDPv4 link remote: [AF_INET]IP ADDRESS HIDDEN:1197
Dec 02 20:47:39: [daa3daef320d8a3a7278175d08689ac2] Peer Connection Initiated with [AF_INET]IP ADDRESS HIDDEN:1197
Dec 02 20:47:42: Opening utun (connect(AF_SYS_CONTROL)): Resource busy
Dec 02 20:47:42: Opened utun device utun1
Dec 02 20:47:42: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Dec 02 20:47:42: /sbin/ifconfig utun1 delete
Dec 02 20:47:42: NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Dec 02 20:47:42: /sbin/ifconfig utun1 IP ADDRESS HIDDEN mtu 1500 netmask 255.255.255.255 up
Dec 02 20:47:42: Initialization Sequence Completed
Dec 02 20:47:42: DNS mode set to: Off
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: Disconnecting due to "No buffer space available" errors.
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: write UDPv4: No buffer space available (code=55)
Dec 02 22:13:03: SIGTERM[hard,] received, process exiting

Frequent disconnects with 10.12.x

Posted: Wed Dec 14, 2016 6:31 pm
by SpookyCow
These frequent disconnects with Viscosity and Mac OS 10.12.x are ridiculous, as referenced in https://www.sparklabs.com/forum/viewtop ... 6602#p6602 and have only become worse with 10.12.2 and Viscosity 1.6.8b2. I've never run into this issue with previous Mac OS releases such as 10.11.x and before with Viscosity.

Re: Viscosity Port Forwarding Applescript

Posted: Tue Dec 20, 2016 10:48 am
by James
Hi,

"write UDPv4: No buffer space available (code=55)" errors are typically caused by misconfigured routes that are causing the VPN connection itself to be routed into the VPN tunnel, which breaks the VPN connection and causes a routing loop. You'll need to check your routing setup to ensure that the VPN server is still directly reachable and that your scripts could not result in the mistaken modification of the routing table.

Cheers,
James

Re: Viscosity Port Forwarding Applescript

Posted: Fri Jan 13, 2017 10:34 am
by SpookyCow
The scripts are not modifying the routing table. I'm not even setting the routing table, other than tell Viscosity to route all traffic via the VPN.
Code: Select all
Jan 12 12:04:03: Viscosity Mac 1.6.8b3 (1367)
Jan 12 12:04:03: Viscosity OpenVPN Engine Started
Jan 12 12:04:03: Running on Mac OS X 10.12.3
Jan 12 12:04:03: ---------
Jan 12 12:04:03: Checking reachability status of connection...
Jan 12 12:04:04: Connection is reachable. Starting connection attempt.
Jan 12 12:04:04: OpenVPN 2.3.14 x86_64-apple-darwin [SSL (OpenSSL)] [LZO] [PKCS11] [MH] [IPv6] built on Dec 12 2016
Jan 12 12:04:04: library versions: OpenSSL 1.0.2j  26 Sep 2016, LZO 2.09
Jan 12 12:04:07: UDPv4 link local: [undef]
Jan 12 12:04:07: UDPv4 link remote: [AF_INET]IP ADDRESS REMOVED:1197
Jan 12 12:04:08: [81318fdbea3a518af41fc06360f4c3d7] Peer Connection Initiated with [AF_INET]IP ADDRESS REMOVED:1197
Jan 12 12:04:11: Opening utun (connect(AF_SYS_CONTROL)): Resource busy
Jan 12 12:04:11: Opened utun device utun1
Jan 12 12:04:11: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Jan 12 12:04:11: /sbin/ifconfig utun1 delete
Jan 12 12:04:11: NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Jan 12 12:04:11: /sbin/ifconfig utun1 IP ADDRESS REMOVED mtu 1500 netmask 255.255.255.255 up
Jan 12 12:04:11: DNS mode set to: Off
Jan 12 12:04:11: Initialization Sequence Completed
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: Disconnecting due to "No buffer space available" errors.
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: write UDPv4: No buffer space available (code=55)
Jan 12 12:08:13: SIGTERM[hard,] received, process exiting
And the buffer space issue seems to start when I'm using most of the bandwidth and no other device is using or even connected to the router.


And as of this latest beta, I have to turn on Allow unsafe OpenVPN commands to be used, just to get connected. Before 10.12.x, I never had these problems. Which of the below are unsafe commands?
Code: Select all
tls-client
resolv-retry infinite
auth-nocache 
mute-replay-warnings 
disable-occ 
auth sha256
remote-cert-tls server
cipher aes-256-cbc
reneg-sec 0
script-security 2
crl-verify crl.rsa.4096.pem

Re: Viscosity Port Forwarding Applescript

Posted: Mon Feb 06, 2017 11:49 pm
by SpookyCow
James wrote:
Hi,

"write UDPv4: No buffer space available (code=55)" errors are typically caused by misconfigured routes that are causing the VPN connection itself to be routed into the VPN tunnel, which breaks the VPN connection and causes a routing loop. You'll need to check your routing setup to ensure that the VPN server is still directly reachable and that your scripts could not result in the mistaken modification of the routing table.

Cheers,
James
I just want to say that the script I'm using only opens a port. Regardless if I use utun1 or utun2, the write UDPv4: No buffer space available (code=55) causing frequent disconnects disconnects are still happening with 1.6.8 and Mac OS 10.12.4 Beta (16E144f).

Frequently random disconnects

Posted: Thu Feb 09, 2017 5:43 am
by SpookyCow
Is anyone else experiencing disconnects with Mac OS 10.12.x and Viscosity 1.6.8 as I've mentioned on page two of this post?

https://www.sparklabs.com/forum/viewtop ... f=3&t=1946

Now, I don't know if it is an OS or Viscosity issue, but my inquiries have seem to gone ignored by James.
And this happens regardless of what VPN server I'm connected to and didn't occur before 10.12.x or 1.6.8.

Also, I asked James in the same post what unsafe OpenVPN commands as I listed are not safe and I didn't get an answer on that either.

Re: Viscosity Port Forwarding Applescript

Posted: Thu Feb 09, 2017 6:05 pm
by James
Hi SpookyCow,

I'm afraid there isn't anything more that we can add that I haven't already mentioned.

What you're experiencing is a routing issue. Your VPN connection is most likely being routed into itself or packets to the VPN server are otherwise being prevented from leaving your computer. If the errors are occurring immediately after connecting then it points to a VPN configuration issue. If it's happening after being connected for a period of time then it points to something on your computer changing network settings that is having an impact on the connection. If it's the latter, and you've performed all of the troubleshooting steps to eliminate other software making changes, the only suggestion left I can offer is to backup all of your files and perform a clean install of macOS.

If an unsafe command is present in your configuration it will be listed in the error message in the log. Please see:
http://www.sparklabs.com/support/kb/art ... -detected/

Cheers,
James