It is possible to save the source IP with iptables, and such behaviour is actually the more normal method for port forwarding.
Delete this line:
iptables -t nat -A POSTROUTING -p tcp -d 25.11.1.253 --dport 9000:9005 -j SNAT --to-source 25.70.228.164
Change this line:
iptables -t nat -A PREROUTING -p tcp --dport 9000:9005 -j DNAT --to-destination 25.11.1.253
To this:
iptables -t nat -A PREROUTING -p tcp -i enp1s0 --dport 9000:9005 -j DNAT --to-destination 25.11.1.253
If the IP address of enp1s0
is known and static ($EXTIP), add this line:
iptables -t nat -A POSTROUTING -o enp1s0 -j SNAT --to $EXTIP
If the IP address of enp1s0
is not known, maybe dynamic, add this line:
iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE
This answer assumes the default policy for the FORWARD chain is ACCEPT. A default policy of DROP might be more secure, which would require these additional rules (untested):
iptables -P FORWARD DROP
iptables -A FORWARD -i ham0 -o enp1s0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i enp1s0 -o ham0 -p tcp --dport 9000:9005 -d 25.11.1.253 -j ACCEPT
You also need to enable forwarding (which I think you did, but for completeness):
echo "1" > /proc/sys/net/ipv4/ip_forward