Sha256: 80e9d3741c2752232f4813257b8f320682b282f68c29b743528f55fcf8cd398e

Contents?: true

Size: 1.11 KB

Versions: 16

Compression:

Stored size: 1.11 KB

Contents

#!/bin/sh

mkdir /store/firewall

# Copy the service.xml firewall rules to a central storage
# so they can survive reboot
cp /etc/vmware/firewall/service.xml /store/firewall

# Remove end tag so rule addition works as expected
sed -i "s/<\/ConfigRoot>//" /store/firewall/service.xml

# Add rule for vnc connections
echo "
  <service id='0033'>
    <id>vnc</id>
    <rule id='0000'>
      <direction>inbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>
        <begin>5900</begin>
        <end>5964</end>
      </port>
    </rule>
    <enabled>true</enabled>
    <required>false</required>
  </service>
</ConfigRoot>" >> /store/firewall/service.xml

# Copy updated service.xml firewall rules to expected location
# Refresh the firewall rules
cp /store/firewall/service.xml /etc/vmware/firewall/service.xml
esxcli network firewall refresh

sed -i "s/exit 0//" /etc/rc.local.d/local.sh

# Add steps to /etc/rc.local/local.sh to repeat these steps on reboot
echo "
cp /store/firewall/service.xml /etc/vmware/firewall/service.xml
esxcli network firewall refresh
exit 0" >> /etc/rc.local.d/local.sh

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
veewee-0.5.0.alpha4 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.5.0.alpha3 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.5.0.alpha2 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.5.0.alpha1 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.5.1 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.5 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.5.pre1 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.4 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.3 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.2 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.1 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.4.0 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.3.12 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.3.11 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.3.10 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh
veewee-0.3.9 templates/VMware-ESXi-5.1-x86_64/vnc_enable.sh