Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

SOLUTION:

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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.