Maybe try this 

sudo gedit /etc/NetworkManager/dispatcher.d/vpn-up
 
 
#! /bin/bash
REQUIRED_CONNECTION_NAME="VM uplink eth0" ##or change to your conection name
VPN_CONNECTION_NAME="example.vpn.com"
default_conn=$(nmcli con show --active | grep "${REQUIRED_CONNECTION_NAME}")
vpn_conn=$(nmcli con show id | grep "${VPN_CONNECTION_NAME}")
if [ "${default_conn}" -a ! "${vpn_conn}" ];
then
    nmcli con up id "${VPN_CONNECTION_NAME}"
fi
 
 
####  change VPN_CONNECTION_NAME to vpn domain
 
Save it
chmod 755 vpn-up
 
 
gedit /etc/NetworkManager/system-connections/"example.vpn.com_"
 
If password type authentification change this section
 
[vpn]
....
connection-type=password
password-flags=0
....
[vpn-secrets]
password=your_password
 
Save it



After reboot it connects automaticaly.But its not the best way bcs the password 
is in plain and script is 755 privilages.But it works.

Then you shold edit firewall settings 
VPN> VM settings > firewall > 
add ip:port vpn
add ip vms
add localhost 
rest tafiic deny


-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/5875883c-e29e-45eb-afdf-2197a754cd08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to