Skip to content

Instantly share code, notes, and snippets.

@hosni
Created February 8, 2021 07:14
Show Gist options
  • Save hosni/50f6342f447a30af35fb27a5f616c8e4 to your computer and use it in GitHub Desktop.
Save hosni/50f6342f447a30af35fb27a5f616c8e4 to your computer and use it in GitHub Desktop.
cat <<EOF > /etc/vmware/firewall/vncServer.xml
<ConfigRoot>
<service>
<id>vncServer</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>5900</begin>
<end>5999</end>
</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
</ConfigRoot>
EOF
esxcli network firewall refresh
and also add above script to `/etc/rc/local.d/local.sh`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment