script-tun forwarding doesn't work with rdesktop

Benn Snyder benn.snyder at
Thu Jan 28 21:26:31 PST 2016

First, thank you for the free software.

I am trying to use the port forwarding feature described at to run a single
program on the VPN.  I have a script like this:

    rdesktop -u USER -d DOMAIN -p PASSWORD

If I connect normally

    # openconnect --juniper

then run my script from another shell, everything works perfectly.
But I want only rdesktop to be forwarded and all other traffic to go
straight to the internet, so I tried the --script-tun flag:

    $ openconnect --juniper --script-tun --script

The juniper connection goes fine and I get a startup message from
rdesktop, but it never connects.  Am I missing something?  Do I need
another piece of code in between?


More information about the openconnect-devel mailing list