这些规则能否缩短为单行:
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3050 -j DNAT --to-destination 192.168.1.3:3050
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3051 -j DNAT --to-destination 192.168.1.3:3051
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3052 -j DNAT --to-destination 192.168.1.3:3052
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3053 -j DNAT --to-destination 192.168.1.3:3053
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3054 -j DNAT --to-destination 192.168.1.3:3054
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3055 -j DNAT --to-destination 192.168.1.3:3055
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3056 -j DNAT --to-destination 192.168.1.3:3056
1 个回答