vrijdag 5 april 2013

VMWare: Cannot disable SSH Firewall rule vSphere 5.1 host

After SSH'd to a ESXi 5.1 host I wanted to stop the ssh daemon and then disable the SSH firewall rule via Virtual Center console, which gave me the next error message:


After doing some research I discovered this is a bug in ESXi 5.1



The bug is explained in the next VMWare KB article:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2037544

Open service.xml in /etc/vmware/firewall:
(First make it writable)
chmod 644 /etc/vmware/firewall/service.xml
chmod +t /etc/vmware/firewall/service.xml

vi /etc/vmware/firewall/service.xml


Locate the sshServer line and change it like below:
<service id='0000'>
   <id>sshServer</id>
   <rule id='0000'>
     <direction>inbound</direction>
     <protocol>tcp</protocol>
     <porttype>dst</porttype>
     <port>22</port>
   </rule>
  <enabled>true</enabled>
  <required>false</required>
</service>

Now re-apply firewall rules with next command:

esxcli network firewall refresh




Geen opmerkingen:

Een reactie posten