Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.