Use external IPs from Internal Network (NAT)
I´m trying to do a firewall with NAT. For now my firewall makes DNAT. It
maps the external IPs to an internal IP. Like this:
$IPT -t nat -A PREROUTING -d $SPHERE_EXT_IP -j DNAT --to $SPHERE_INT_IP
and I allow some ports in the forward chain. Everything works fine.
I want to use the external IPs from the internal Network too.
I know I have to do it with the OUTPUT -t nat chain, but my rules are
$IPT -t nat -A OUTPUT -d $SPHERE_EXT_IP -j DNAT --to $SPHERE_INT_IP
but nothing happens.
What am I doing wrong?
Thx for your help.