Table of contents
2. Modify the default port of the console
1. When the firewall is turned off:
1.1. Remotely enter the background of ESXI and modify the HTTP port configuration file
2. Without closing the firewall:
2.1. Modify the HTTP port configuration file
2.3. Create a configuration file
2.4. Copy the rule configuration file to the firewall directory
2.5. Refresh the network rules of the firewall
2.6, write to the local shell file
1. Open the SSH service
1. It is very simple to enable the SSH service. For details, please refer to: #VMware#ESXI Enable the SSH service of the host
2. Modify the default port of the console
There are two ways to modify the default port of the console:
1. When the firewall is turned off:
1.1. Remotely enter the background of ESXI and modify the HTTP port configuration file
vi /etc/vmware/rhttpproxy/config.xml
Find <proxy> and modify it
Original content:
Modify it to:
save and exit
1.2, close the ESXI firewall
esxcli network firewall set --enabled false
Turn off the firewall through the above command, and then check it through the following command
esxcli network firewall get
1.3. Restart the server
Verify that the current port has been modified
It can be accessed normally through the new port.
2. Without closing the firewall:
2.1. Modify the HTTP port configuration file
The specific operation content is consistent with step 1.1
2.2. Restart the service
/etc/init.d/rhttpproxy restart
2.3. Create a configuration file
cd /vmfs/volumes/test
##test是存储卷的名字
Create a test.xml
vi test.xml
<ConfigRoot>
<service>
<id>testport</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>10443</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
</ConfigRoot>
##上面第一步只修改了https的端口,改为10443
2.4. Copy the rule configuration file to the firewall directory
/sbin/cp /vmfs/volumes/test/test.xml /etc/vmware/firewall/
2.5. Refresh the network rules of the firewall
/sbin/esxcli network firewall refresh
2.6, write to the local shell file
vi /etc/rc.local.d/local.sh
Original file:
Modifications:
/sbin/cp /vmfs/volumes/test/test.xml /etc/vmware/firewall/
/sbin/esxcli network firewall refresh
exit 0
There is no need to restart, and you can access it through the new port of https later, and restarting will not affect this configuration.
Thanks for reading!