for example:
iptables -t nat -I PREROUTING -p tcp -d 192.168.1.0/24 --dport 2222 -j DNAT --to-destination 127.0.0.1:2222
Solution:
1. Add forwarding in /etc/sysctl.conf
net.ipv4.conf.eth0.route_localnet=1
Then refresh sysctl -p, if you don't want to permanently use the mode that takes effect at the time: sysctl -w net.ipv4.conf.eth0.route_localnet=1
refer to:
https://unix.stackexchange.com/questions/111433/iptables-redirect-outside-requests-to-127-0-0-1