Software Isolation Using OpenVZ
First you need to configure OpenVZ ( installation manual for RHEL / CentOS / Fedora ), there are quite a lot of manuals on this issue, so I won’t stop.
We create a container, for example, it can be the same fedora ( 27232 - go container)
vzctl create 27232 --ostemplate fedora-12-x86 (ubuntu, debian) we
Start
vzctl start 27232
Do not forget that the Internet must work for the virtual machine to work successfully ( NAT ), because we don’t forget to check, ping, pull some file in the net.
vzctl exec 27232 ping mail.ru
PING mail.ru (217.69.128.43) 56 (84) bytes of data.
64 bytes from mail.ru (217.69.128.43): icmp_seq = 1 ttl = 118 time = 66.0 ms
64 bytes from mail.ru (217.69.128.43): icmp_seq = 2 ttl = 118 time = 66.4 ms
The network is working, proceed to installation software.
vzctl exec 27232 yum install firefox xauth liberation \ * fonts (vzctl exec 27232 apt-get install firefox xauth ttf-liberation dbus dbus-X11)
Redirect output to ssh
vzctl exec 27232 sed 's /^.* X11Forwarding. * $ / X11Forwarding yes / '
vzctl exec 27232 /etc/init.d/sshd restart
Create a user who will run the software
vzctl set 27232 --userpasswd ffox: mysecpass
That's all, now it remains only to connect and launch firefox.
ssh -Y ffox @ ip dbus-launch firefox --no-remote
For testing, I leave a working virtual machine, please do not abuse it.
ssh -Y [email protected] dbus-launch firefox --no-remote password mysecpass