if you connect your AppVm 'personal' with it you ll
use your original IP adress.
sys-net < sys-firewall < personal
thats why I created a ProxyVM named 'vpn'
my AppVm 'Personal' has this ProxyVM named 'vpn' selected as NetVM
sys-net < sys-firewall < vpn < personal
if I do an IP check I get the IP from the vpn server I selected in my
'vpn' network manager.
PROBLEM
my real IP gets shown if I do not connect to any vpn server in my 'vpn'
that means my 'personal' appVM connects with the sys-firewall if im not connected to any vpn server. (the proxyVM 'vpn' is still running)
how can I force my appvm to not connect to the internet of my sys-firewall and only with the vpn ?
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