Author Topic: [SOLVED] Remove 127.0.0.1 from resolv.conf ??  (Read 21781 times)

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
[SOLVED] Remove 127.0.0.1 from resolv.conf ??
« on: September 19, 2012, 04:33:13 pm »
Hy there,

Please can anyone tell me how to remove the localhost line from resolv.conf?

Zentyal is my gateway, i have a server with 2003 that is the dhcp and the domain.
If i comment/remove 127.0.0.1 and first entry is domain ip in resolv.conf zentyal can ping/dig/nslookup any computer name inside my lan, if 127.0.0.1 is the first entry i only can ping to ip address inside my lan.

Any clue?

Thanks

[Thread resume]
Configure zentyal as gateway firewall dhcpclient, dns server, transparent proxy IN a domain
dhcp server:
search domain -> your domain name
primary server: local zentyal dns
secondary nameserver: empty
 enable dynamic dns
dynamic domain  (same as before)
static same as dynamic

dns server:
Enable transparent dns cache (important)
your domain mus be dynamic domain
in tab hostnames add computers that you have configured as static ip and don't will be dhcp clients

http proxy:
transparent check
« Last Edit: September 21, 2012, 10:07:56 am by codedmind »

ttrerice

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #1 on: September 19, 2012, 05:00:13 pm »
I am having the same problem.  We do know that it has something to do with ARP cache, but I do not have any details on how to resolve the problem yet.  You are probably using windows 7 - let me know!

Thanks!

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #2 on: September 19, 2012, 05:03:28 pm »
In my netwotk i have mixed OS.

Win XP, Vista and 7.

The main problem is with zentyal because dns.

The local interface (eth0) has a static ip 191.168.1.254 and the server domain ip is 192.168.1.2

christian

  • Guest
Re: Remove 127.0.0.1 from resolv.conf
« Reply #3 on: September 19, 2012, 05:27:40 pm »
Could you please explain further - or rephrase - what your problem is.
I understood that Zentyal is your gateway and internal Win2003 server handles DHCP server.
This Win2003 server is also your "domain??? but this I don't understand  :-[  do you mean DNS ?
I also don't understand what "domain IP" means...

When you write that you can or can not ping depending on resolv.conf content, do you mean ping from any computer in your LAN or from Zentyal server itself?
What does resolv.conf contain and what did you configure on Zentyal server in term of DNS ?

Do you also confirm that resolv.conf content prevent to ping IP address? I'm a bit surprised. Do you mean ping "serveur outside of your LAN" rather than "IP address"? (meaning using FQDN)

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #4 on: September 19, 2012, 05:34:21 pm »
Hy.

Zentyal is gateway ip -> 192.168.1.254 (hostname zentyal)
win2003K server (that is dhcp server, and domain controller aka mydomain.local) ip -> 192.168.1.2 (hostname server01)

Now in resolv.conf i have this:
search mydomain.local
127.0.0.1
192.168.1.2
8.8.8.8
8.8.8.4

With that resolv.conf from zentyal i can't ping server01, but can ping 192.168.1.2

If i comment 127.0.0.1
I can ping server01 and 192.168.1.2

I understand why zentyal have 127.0.0.1 in resolv.conf it is faster, but if i put it there i can't ping hostnames :|

another problem that i have is when i do a traceroute from zentyal

the first jump is empty....

traceroute to google.com (173.194.34.233), 30 hops max, 60 byte packets
 1  * * *
 2  94.46.225.9 (94.46.225.9)  5.063 ms  5.253 ms  5.535 ms
 3  94.46.224.165 (94.46.224.165)  5.776 ms  6.285 ms  6.551 ms
 4  94.46.143.21 (94.46.143.21)  11.739 ms  11.967 ms  12.186 ms

If i do the traceroute from another pc the empty jump is the second because the first is to zentyal... any clue?
« Last Edit: September 19, 2012, 06:11:58 pm by codedmind »

christian

  • Guest
Re: Remove 127.0.0.1 from resolv.conf
« Reply #5 on: September 19, 2012, 06:55:22 pm »
Is DNS service started on you Zentyal server ?

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #6 on: September 19, 2012, 07:45:59 pm »
Yes
Because i need http proxy i need dns and users module :/

christian

  • Guest
Re: Remove 127.0.0.1 from resolv.conf
« Reply #7 on: September 19, 2012, 09:55:34 pm »
Because i need http proxy i need dns and users module :/
This is a misunderstanding  :-[
With HTTP proxy, you need Zentyal to act as DNS client, not DNS server. Stop this DNS server and this should solve your issue  8)

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #8 on: September 20, 2012, 12:38:55 am »
I will try it.

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #9 on: September 20, 2012, 02:21:48 am »
I believe setting a forwarder entry to point to the domain controller would also work.

christian

  • Guest
Re: Remove 127.0.0.1 from resolv.conf
« Reply #10 on: September 20, 2012, 05:41:43 am »
Sure it may but what would be the purpose ? I mean running empty DNS forwarding requests.
DNS server would be useful here in case you don't want to run HTTP proxy but don't want users to resolve names using external DNS.
Relay to internal DNS  ::) except if there is something I don't understand, of course  :D

Furthermore, it looks like DHCP server is pushing Zentyal as default gateway (I hope  ;D) but also as DNS  ::)

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #11 on: September 20, 2012, 08:18:47 am »
yes zentyal is the default gateway

as dns what i should put in dhcp? 192.168.1.2 and 8.8.8.8 or i should put 192.168.1.254 (zentyal) and 8.8.8.8 and 192.168.1.2 only in wins?

thanks

christian

  • Guest
Re: Remove 127.0.0.1 from resolv.conf
« Reply #12 on: September 20, 2012, 08:38:40 am »
- why would you want to set Zentyal (192.168.1.254) as your DNS server if this is not your DNS server (I assume that DNS server is your Windows server 192.168.1.2)
- setting 8.8.8.8 as DNS server for DHCP clients makes sense only if your DNS server can't resolve external names and also if you need to resolve such external names. If you use HTTP proxy and local SMTP, you don't need any external DNS for clients (at least for these services)
- this also assumes that Zentyal uses external DNS (e.g. 8.8.8.8) in network settings (this has nothing to do with Zentyal DNS service)

clearer now  ???

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #13 on: September 20, 2012, 09:14:14 am »
A bit...

But 192.168.1.2 to get net pass trought zentyal... i only need 192.168.1.2 as dns because intranet computers...

codedmind

  • Zen Monk
  • **
  • Posts: 54
  • Karma: +2/-0
    • View Profile
Re: Remove 127.0.0.1 from resolv.conf
« Reply #14 on: September 20, 2012, 09:23:44 am »
If i disable dns i can't run http proxy :/