我想将所有流量从 server1 转发到具有相同域的 server2:
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination IpServer1
iptables -t nat -A PREROUTING -j DNAT --to-destination DomainServer2
iptables -t nat -A POSTROUTING -j MASQUERADE
但输出:错误的 IP 地址 iptables -t nat