KVM Server all running fine and dandy on Centos 7.
When I try and connect from the windows client using Virt-Viewer I get "Cannot connect to graphics server".
Shut down firewalld and all works.
Clearly a problem with IPTables. But at this time of night it's not exactly leaping out at me. Port 5902 needs to be open.
The KVM is behind a NAT, but this I think is the red herring as the NAT is forwarding on just fine.
Here is IPTables just in case anyone is still up and in a vaguely helpful mood.
So the question is WTF is port 5902 getting blocked?
When I try and connect from the windows client using Virt-Viewer I get "Cannot connect to graphics server".
Shut down firewalld and all works.
Clearly a problem with IPTables. But at this time of night it's not exactly leaping out at me. Port 5902 needs to be open.
The KVM is behind a NAT, but this I think is the red herring as the NAT is forwarding on just fine.
Here is IPTables just in case anyone is still up and in a vaguely helpful mood.
So the question is WTF is port 5902 getting blocked?
GNU nano 2.3.1 File: iptables
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
#DHCP Rules
-A INPUT -m udp -p udp --dport 67 -m comment --comment "DHCP" -j ACCEPT
-A INPUT -m udp -p udp --dport 68 -m comment --comment "DHCP" -j ACCEPT
-A INPUT -m udp -p udp --dport 2535 -m comment --comment "DHCP" -j ACCEPT
#Active Directory rules
-A INPUT -m udp -p udp --dport 53 -m comment --comment "DNS" -j ACCEPT
-A INPUT -m udp -p udp --dport 88 -m comment --comment "Kerberos UDP" -j ACCEPT
-A INPUT -m udp -p udp --dport 123 -m comment --comment "NTP" -j ACCEPT
-A INPUT -m udp -p udp --dport 135 -m comment --comment "RPC UDP" -j ACCEPT
-A INPUT -m udp -p udp --dport 137 -m comment --comment "NetBIOS Netlogon and Browsing" -j ACCEPT
-A INPUT -m udp -p udp --dport 138 -m comment --comment "NetBIOS Netlogon and Browsing" -j ACCEPT
-A INPUT -m udp -p udp --dport 389 -m comment --comment "LDAP UDP" -j ACCEPT
-A INPUT -m udp -p udp --dport 445 -m comment --comment "SMB CIFS" -j ACCEPT
-A INPUT -m udp -p udp --dport 464 -m comment --comment "Kerberos Password Management" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -m comment --comment "SMTP" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -m comment --comment "DNS" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 88 -m comment --comment "Kerberos" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 135 -m comment --comment "RPC" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -m comment --comment "NetBIOS Session" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -m comment --comment "LDAP TCP" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -m comment --comment "SMB CIFS" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 464 -m comment --comment "Kerberos Password Management" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 543 -m comment --comment "Kerberos" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 636 -m comment --comment "LDAP SSL" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 749 -m comment --comment "Kerberos administration" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3268 -m comment --comment "LDAP Global Catalog" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3269 -m comment --comment "LDAP Global Catalog SSL" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9389 -m comment --comment "AD DS Web Services" -j ACCEPT
#End of active directory rules
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -m comment --comment "Spice Client" -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
COMMIT
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
#DHCP Rules
-A INPUT -m udp -p udp --dport 67 -m comment --comment "DHCP" -j ACCEPT
-A INPUT -m udp -p udp --dport 68 -m comment --comment "DHCP" -j ACCEPT
-A INPUT -m udp -p udp --dport 2535 -m comment --comment "DHCP" -j ACCEPT
#Active Directory rules
-A INPUT -m udp -p udp --dport 53 -m comment --comment "DNS" -j ACCEPT
-A INPUT -m udp -p udp --dport 88 -m comment --comment "Kerberos UDP" -j ACCEPT
-A INPUT -m udp -p udp --dport 123 -m comment --comment "NTP" -j ACCEPT
-A INPUT -m udp -p udp --dport 135 -m comment --comment "RPC UDP" -j ACCEPT
-A INPUT -m udp -p udp --dport 137 -m comment --comment "NetBIOS Netlogon and Browsing" -j ACCEPT
-A INPUT -m udp -p udp --dport 138 -m comment --comment "NetBIOS Netlogon and Browsing" -j ACCEPT
-A INPUT -m udp -p udp --dport 389 -m comment --comment "LDAP UDP" -j ACCEPT
-A INPUT -m udp -p udp --dport 445 -m comment --comment "SMB CIFS" -j ACCEPT
-A INPUT -m udp -p udp --dport 464 -m comment --comment "Kerberos Password Management" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -m comment --comment "SMTP" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -m comment --comment "DNS" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 88 -m comment --comment "Kerberos" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 135 -m comment --comment "RPC" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -m comment --comment "NetBIOS Session" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -m comment --comment "LDAP TCP" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -m comment --comment "SMB CIFS" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 464 -m comment --comment "Kerberos Password Management" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 543 -m comment --comment "Kerberos" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 636 -m comment --comment "LDAP SSL" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 749 -m comment --comment "Kerberos administration" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3268 -m comment --comment "LDAP Global Catalog" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3269 -m comment --comment "LDAP Global Catalog SSL" -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9389 -m comment --comment "AD DS Web Services" -j ACCEPT
#End of active directory rules
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -m comment --comment "Spice Client" -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
COMMIT
Comment