Skip to content

Commit a6f34c5

Browse files
authored
fix: 更具体的说明方式
1 parent 5a72d97 commit a6f34c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/en/guide/pve/pve_custom.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,22 @@ The above commands require the ```sudo``` and ```crontab``` commands to be avail
139139

140140
## Self-mapping of public ports on KVM VMs with open NATs
141141

142+
All of the following operations are performed on the PVE host computer
143+
142144
Use the ```nano``` or ```vim``` command to modify the file to add port mapping:
143145

144146
```
145147
/etc/iptables/rules.v4
146148
```
147149

148-
For example, if I have a KVM VM with an intranet IP of ```172.16.1.152```, and MYSQL has been set up to listen to ```3306```, and I need to use the ```tcp``` protocol to map out to the ```33306``` port on the host IP, I would add the following line to the ```COMMIT``` line in the file above, then add the following line
150+
For example, if I have a KVM VM with an intranet IP of ```172.16.1.152``` (VMs can view the intranet IP address on the web side no matter what system they are on), and MYSQL has been set up to listen to ```3306```, and I need to use the ```tcp``` protocol to map out to the ```33306``` port on the host IP, I would add the following line to the ```COMMIT``` line in the file above, then add the following line
149151

150152
```
151153
-A PREROUTING -i vmbr0 -p tcp -m tcp -dport 33306 -j DNAT --to-destination 172.16.1.152:3306
152154
```
153155

156+
If it's udp protocol, just change ```tcp``` to ```udp``` in the code above
157+
154158
Save the file and exit file editing and then execute:
155159

156160
```
@@ -176,3 +180,4 @@ echo "kvm64" > /usr/local/bin/cpu_type
176180
```
177181

178182
Specifying the default CPU TYPE in this way allows you to replace ```kvm64``` with the type you want
183+

0 commit comments

Comments
 (0)