# /etc/resolv.conf keeps getting blanked out [Solved]

## PM17E5

I have "dhcp_wlan0="nodns" set in /etc/conf.d/net however every once in a while, like perhaps every 5 different networks or reconnects, my /etc/resolv.conf file will get reset into the default:

```
# Generated by dhcpcd

# /etc/resolv.conf.head can replace this line

# /etc/resolv.conf.tail can replace this line
```

I'm not sure what could be wrong. Could anyone give me any pointers where to look?Last edited by PM17E5 on Thu Feb 02, 2012 10:03 pm; edited 1 time in total

----------

## tony-curtis

Are you sure it's something happening on wlan0 that is doing this?  Maybe another network interface is responsible.

----------

## PM17E5

I'm quite sure, I don't use any other network interfaces, though I'll go ahead and add those lines for everything else I see in ifconfig -a just to be on the safe side. It usually happens when I restart wlan0. But perhaps it's just an idle eth0 doing something at bootup? Thanks for the tip, I'll see if it ever does it again.

----------

## wuzzerd

You might try creating  /etc/resolv.conf.head with your desired resolv.conf as its contents.  This is the first time I've seen that, but if I ever get bitten by dhcp overwriting my dhcpd I sure would give it a go.

----------

## PM17E5

Thank you, I didn't have much special in them just had 4.2.2.1 and 4.2.2.2 but while I'm at it I might as well try the google servers since I'm not a big fan of Verizon. So basically I just have the file duplicated with a .head at the end? I'll give it a try.

----------

