LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   nat problem on sendmail server (http://www.linuxquestions.org/questions/linux-server-73/nat-problem-on-sendmail-server-778693/)

surrealse7en 12-29-2009 09:46 AM

nat problem on sendmail server
 
Hi all,
I have a dilemma on my hands. I have always run my private servers on a dsl line. I used my own routers and never had an issue with mail. Partly due to the fact that my router translated the NAT IP (192.168.1.x) into a routable IP.
Now, I have had ATT U-verse installed. The router that came with U-verse, a 2-wire all in one type thing (modem,hpna,router,julianne fry maker), has a bridge in it that makes my static IPs local to my NAT IPs. My problem is that my mail server is trying to route my 192.168.1.x client addresses as routable IPs. and of course everyone is denying relay. The router is dummy like so there is very little help there to make the NAT IPs appear as a routable address. I have tried adding a hostname entry (192.168.1.x client.local) on the server and that didn't work. I am just not savy enough to come up with a solution around this.
Any ideas?

-surrealse7en

volga629 12-29-2009 05:44 PM

Try to set static port mapping example: 192.168.0.1:25 <-----> to you WAN IP port :25 or just static NAT from local to WAN or if you using postfix set the the transport parameter from main.cf and transport file should use send smtp traffic to you router.
Example transport:

# Internal delivery.
example.com :
.example.com :

# External delivery.
#
* smtp:mail.example.com

surrealse7en 01-04-2010 05:47 PM

didn't work
 
Well,
I think I understood your idea. I tried putting in the map in iptables under nat, but that didn't resolve the issue.
Let me explain further. My router carries a routable IP address by itself. Then it uses nat to translate. Now here's where I'm having issues. I have static IPs from my ISP to run my servers on. You input the static IPs into the router and I assume it creates a routing table with the local IPs and the public IPs run together. So, when I mail someone...usually the nat would translate a local IP into the WAN IP on the client side and look like a routable public IP. That is not happening here. My MTA (sendmail) is on a public IP, but when I send mail from my local computers the show up in sendmail as local. Sendmail then routes the mail from my local IP subnet.


-surrealse7en

volga629 01-06-2010 11:37 AM

First I think bad idea put MTA on Internet. Second check dns record include mx you can use nslookup -querytype=mx domain.name , or dig mx domain.name and check reverse dns records if it is point to you mail.domain.host use nslookup -querytype=ptr IP of mail domain host. And here the test website where you can see what is not done yet.
http://www.dnscolos.com/free-dns-report.html

Please post outputs to give you help.


All times are GMT -5. The time now is 09:59 PM.