Wednesday, 7 October 2020

Correct way to change port.. this should work - ignore previous one

 

  1. edit "/etc/vmware/rhttpproxy/config.xml" (<httpsPort>443</httpsPort> to <httpsPort>4444</httpsPort>)

  2. run command "/etc/init.d/rhttpproxy restart"

  3. create new file "/etc/vmware/firewall/changes.xml"

  4. copy this text to file:

<ConfigRoot>
    <service>
        <id>changedport</id>
        <rule id='0000'>
            <direction>inbound</direction>
            <protocol>tcp</protocol>
            <porttype>dst</porttype>
            <port>4444</port>
        </rule>
        <enabled>true</enabled>
        <required>false</required>
    </service>
</ConfigRoot>
  1. run command "/sbin/esxcli network firewall refresh"

  2. copy above file into /vmfs/volumes/xxxxxxx-80925220-52bf-b8ac6f41950b/changes.xml

  3. add below code to "/etc/rc.local.d/local.sh" for work after reboot:

/sbin/cp /vmfs/volumes/xxxxxxx-80925220-52bf-b8ac6f41950b/changes.xml/ etc/vmware/firewall/

/sbin/esxcli network firewall refresh

exit 0

done.

No comments:

Post a Comment