I have a firewall with two network cards. From internet it's possible to access the external-ip and then be forwarded to an internal server. But when on the DMZ and accessing the external-ip, I'm not forwarded back into the internal server.
I guess this is the rules that are relevant to this question. Shouldn't they be enough.
$IPTABLES -t nat -A PREROUTING -p TCP -d $MAIL_IP --dport 122 -j DNAT --to-destination $DMZ_MAIL_IP:22 $IPTABLES -A FORWARD -p TCP -o $DMZ_IFACE -d $DMZ_MAIL_IP -m multiport --dports 122 -j allowed
I have lot's of other rules, and infact two other network cards, just isolating the question here.
I had a to restrictive SNAT rule.
Something like this solved the problem. iptables -t nat -I POSTROUTING -s $INTERNAL_CLIENT -j SNAT --to-source $MAIL_IP