Link to home
Start Free TrialLog in
Avatar of Ksean
KseanFlag for United States of America

asked on

DNS for Fedora 18

Hi Experts,
I have a Fedora 18 in DMZ with the external dns server.
But when it sends me a log message via an email, it should go to the SMTP server where is in inside network. I already open the smtp port on the firewall.
When I did nslookup, it tries to resolve the smtp server using the external DNS.
How can it specify this computer to go to the internal DNS when it tries to send email?
The smtp server is working just fine with all other servers.
Thanks in advance.
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

Do you have internal DNS server defined in your /etc/resolv.conf?
Avatar of Ksean

ASKER

yes.

search local.com
nameserver 198.6.1.4
nameserver 198.6.1.5

Is there any other location that I have to modify to resovle the internal host names while the external DNS are specified in ifcfg-eth0?
Sounds like you have NetworkManager running.

You can check your ifcfg files if this is present NM_CONTROLLED=YES. If NM is running, NM will take the DNS servers you defined in ifcfg-xxx and overwrite them into resolv.conf.

So the answer is updating the ifcfg-eth0 if you have NM running, else you have to edit resolv.conf manually.
Avatar of Ksean

ASKER

NM is running and I update resolve.conf file manually but I haven't restarted NM yet.
Will it be OK after restarting NM?
You need to update the network scripts - ifcfg-eth0 if you have NM running, NM may overwrite the entry in resolv.conf.

DNS1=1.2.3.4
DNS2=1.2.3.5

Open in new window

After updating the network scripts, run. Be aware that it will disrupt the connection of the server.
service NetworkManager stop
service NetworkManager start

Open in new window

Avatar of Ksean

ASKER

ifcfg has still dns1=198.6.1.4 and dns2=198.6.1.5 from the biginning. These are the external DNS of verizon. I cannot have an internal DNS because this is in DMZ. Do I need anything else?
Can you clarify the following?

How can it specify this computer to go to the internal DNS when it tries to send email?
I cannot have an internal DNS because this is in DMZ.
Avatar of Ksean

ASKER

When one of the linux in DMZ sends me where in Inside network a log every day, it uses a SMTP server where is in Inside network so I opened port 25 between the DMZ and Inside.
The linux has the external DNS servers which is 198.6.1.5 When the linux sends an email using the Inside SMTP server, it tries to resolve the host name by the external DNS which cannot be resolved.
This what i need.
The linux should be resolved the host name internally when it sends me an email and all others should be resolved by the external DNS.
I hope this makes sense.
I will try to restart NM since I already changed the resolv.conf file to see how it goes.
ASKER CERTIFIED SOLUTION
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ksean

ASKER

Thanks