Redirecting outgoing traffic to a LAN IP

Hi, I want to redirect all traffic sent to a external IP to an internal IP: ie. if a LAN device wants to communicate with 1.2.3.4, it should actually be communicating with 192.168.1.10.

I think these two rules below work, but can anyone suggest how to do this in /ett/config/firewall?

iptables -t nat -A PREROUTING -d 1.2.3.4 -j DNAT --to-destination 192.168.1.10
iptables -t nat -A POSTROUTING -s 192.168.1.10 -j SNAT --to-source 1.2.3.4
1 Like
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.