Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 19. Proxies
19.1. SPICE Proxy Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
19.1.1. SPICE Proxy Overview Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
The SPICE Proxy is a tool used to connect SPICE Clients to virtual machines when the SPICE Clients are outside the network that connects the hypervisors. Setting up a SPICE Proxy consists of installing Squid on a machine and configuring iptables to allow proxy traffic through the firewall. Turning a SPICE Proxy on consists of using engine-config on the Manager to set the key
SpiceProxyDefault
to a value consisting of the name and port of the proxy. Turning a SPICE Proxy off consists of using engine-config on the Manager to remove the value to which the key SpiceProxyDefault
has been set.
Important
The SPICE Proxy can only be used in conjunction with the standalone SPICE client, and cannot be used to connect to virtual machines using SPICE HTML5 or noVNC.
19.1.2. SPICE Proxy Machine Setup Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
This procedure explains how to set up a machine as a SPICE Proxy. A SPICE Proxy makes it possible to connect to the Red Hat Enterprise Virtualization network from outside the network. We use Squid in this procedure to provide proxy services.
Procedure 19.1. Installing Squid on Red Hat Enterprise Linux
- Install Squid on the Proxy machine:
yum install squid
# yum install squid
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open
/etc/squid/squid.conf
. Change:http_access deny CONNECT !SSL_ports
http_access deny CONNECT !SSL_ports
Copy to Clipboard Copied! Toggle word wrap Toggle overflow to:http_access deny CONNECT !Safe_ports
http_access deny CONNECT !Safe_ports
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the proxy:
service squid start
# service squid start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the default squid port:
iptables -A INPUT -p tcp --dport 3128 -j ACCEPT
# iptables -A INPUT -p tcp --dport 3128 -j ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Make this iptables rule persistent:
service iptables save
# service iptables save
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You have now set up a machine as a SPICE proxy. Before connecting to the Red Hat Enterprise Virtualization network from outside the network, activate the SPICE proxy.
19.1.3. Turning on SPICE Proxy Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
This procedure explains how to activate (or turn on) the SPICE proxy.
Procedure 19.2. Activating SPICE Proxy
- On the Manager, use the engine-config tool to set a proxy:
engine-config -s SpiceProxyDefault=someProxy
# engine-config -s SpiceProxyDefault=someProxy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the ovirt-engine service:
service ovirt-engine restart
# service ovirt-engine restart
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The proxy must have this form:protocol://[host]:[port]
protocol://[host]:[port]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Only SPICE clients shipped with Red Hat Enterprise Linux 6.7, Red Hat Enterprise Linux 7.2, or newer support HTTPS proxies. Older clients only support HTTP. If HTTPS is specified for older clients, the client will ignore the proxy setting and attempt a direct connection to the hypervisor.
SPICE Proxy is now activated (turned on). It is now possible to connect to the Red Hat Enterprise Virtualization network through the SPICE proxy.
19.1.4. Turning Off a SPICE Proxy Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
This procedure explains how to turn off (deactivate) a SPICE proxy.
Procedure 19.3. Turning Off a SPICE Proxy
- Log in to the Manager:
ssh root@[IP of Manager]
$ ssh root@[IP of Manager]ssh root@[IP of Manager]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command to clear the SPICE proxy:
engine-config -s SpiceProxyDefault=""
# engine-config -s SpiceProxyDefault=""
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the Manager:
service ovirt-engine restart
# service ovirt-engine restart
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
SPICE proxy is now deactivated (turned off). It is no longer possible to connect to the Red Hat Enterprise Virtualization network through the SPICE proxy.