我如何更改esxi主机6.7中的默认端口80和443?

问题描述 投票:0回答:1

我正在免费运行esxi 6.7。

我想通过路由器将esxi暴露给Internet。但是我想更改默认端口,该默认端口是80和443。

我发现许多教程/ knownledge基础可用于esxi 5.0和6.0,但是这些都不起作用。

在这些教程中,有一部分包含防火墙和反向代理,但是无论我做什么,都行不通,主要是当我重新启动防火墙时。

port esxi
1个回答
1
投票

我想它已经解决了,但对于其他人。。。

[如何在ESXi 6.7主机视频上通过ssh更改端口->https://www.youtube.com/watch?v=a7kuwmLuwvU或在路由器端口中设置从443重定向到所需端口(如果可能)。

编辑:对于他们更喜欢阅读的内容:-)

1. enable ssh on esxi host
2. connect via ssh or press alt + f1 on esxi host
3. edit this file by command vi /etc/vmware/rhttpproxy/config.xml
4. find text https by command :/https
<!-- HTTPS port to be used by the reverse proxy -->
<httpsPort>443</httpsPort>
5. change port to eg. 9443 
(press insert before editing and after finished press esc save it by :wq)
6. reboot needed by command reboot
7. after reboot connect to ssh and create new file changedport.xml by command 
vi /etc/vmware/firewall/changedport.xml
8. copy this text to console.
<ConfigRoot>
  <service>
    <id>changedport</id>
    <rule id='0000'>
      <direction>inbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>9443</port>
    </rule>
    <enabled>true</enabled>
    <required>false</required>
  </service>
</ConfigRoot>
9. save it by :wq
10. refresh firewall rules by command esxcli network firewall refresh

这不是永久解决方案。重新启动后,您需要再次添加防火墙规则并执行命令esxcli网络防火墙刷新

© www.soinside.com 2019 - 2024. All rights reserved.