Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Network card drivers overwriting my dns domain name
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 5:25 pm    Post subject: [Solved] Network card drivers overwriting my dns domain name Reply with quote

I've got a Blitzz network card that works with the adm8211 pci wireless card drivers. I've also followed the Gentoo Wiki TIP for Setting Your FQDN. The FQDN (fully qualified domain name) works fine when my /etc/resolve.conf is clear but as soon as my wireless card gets an IP address from the DHCP, my /etc/resolve.conf gets set to:
Code:
nameserver 192.168.0.1
search clvdoh.adelphia.net

where 192.168.0.1 is my D-Link router and clvdoh.adelphia.net is my ISP. I'm hoping that this is just some kind of configuration problem that enables the wireless driver to overwrite my /etc/resolve.conf when it gets an IP address from the DHCP.

/etc/conf.d/net:
comments removed for readability
Code:

iface_eth1="dhcp"
gateway="/"


/etc/conf.d/wireless:
Code:
essid_eth1="my_essid"
key_my_essid="my_wep"


If anyone has any ideas about how to keep my wireless drivers from overwriting my dnsdomainname, please help.[/b]
_________________
Symlinks to:
xorg.conf


Last edited by BlindSpy on Tue Jun 07, 2005 5:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 5:31 pm    Post subject: Reply with quote

Add " -R " to the dhcpcd statement in /etc/conf.d/net
Code:
dhcpcd_eth1="-R"

"-R" will prevent your dchpd server from overwriting you resolv.conf file.

FYI, if you use ntp, add " -N " as well. " -N " will prevent the dhcpd server from overwriting the ntp.conf file.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 5:39 pm    Post subject: Reply with quote

AAH thank you! I had -N and I thought that may have been causing the problem. Hopefully this will fix it. Thank you for your quick and clear responds.
_________________
Symlinks to:
xorg.conf


Last edited by BlindSpy on Sat Jun 04, 2005 5:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 5:41 pm    Post subject: Reply with quote

You're Welcome! Make sure to add [solved] to the subject line of this thread.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 5:47 pm    Post subject: Reply with quote

Something I'm affraid of though is that I may not get an IP address from my router unless it's put its own crap in the /etc/resolv.conf. The way I tested this was, with my /etc/resolv.conf first cleared, running dhcpcd and just kept reprinting /etc/resolv.conf until I got an IP address from my router (since it usually takes a while). I found that it didn't get an IP address until the stuff in /etc/resolv.conf was filled in.
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 6:01 pm    Post subject: Reply with quote

What version of baselayout are you using? (emerge -s baselayout)
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 6:01 pm    Post subject: Reply with quote

baselayout-1.11.12-r4

even with those flags I've added, It just adds old wireless info to the /etc/resolv.conf instead of the latest stuff. And I cant connect to the internet unless I have nameserver 192.168.0.1 in there. This is the line that causes my FQDN to screw up though. Instead of using radix.mine.nu it just uses mine.nu which is incorrect.
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 6:10 pm    Post subject: Reply with quote

Doesn't that version of baselayout use /etc/conf.d/domainname and /etc/conf.d/hostname to set the FQDN as opposed to /etc/hostname and /etc/dnsdomainname? I can't check that on my own system since it's using the older, unmasked baselayout.

Also check to see if you have "hostname" and "domainname" enabled in rc-update.
Code:
rc-update show
domainname |      default
hostname | boot
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 6:13 pm    Post subject: Reply with quote

domainname and hostname are both in the rc startup and yes the new baselayout uses /etc/conf.d/* instead of the /etc/* ones.
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 6:22 pm    Post subject: Reply with quote

What do /etc/conf.d/domainname and hostname contain?
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 6:24 pm    Post subject: Reply with quote

Code:
# /etc/conf.d/domainname
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/conf.d/domainname,v 1.1.4.1 2005/02/19 02:13:53 vapier Exp $

# When setting up resolv.conf, what should take precedence?
# If you wish to always override DHCP/whatever, set this to 1.
OVERRIDE=1

# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).
#
DNSDOMAIN="radix.mine.nu"

# This only set what /bin/hostname returns.  If you need to setup NIS, meaning
# what /bin/domainname returns, please see:
#
#   http://www.linux-nis.org/nis-howto/HOWTO/
#
NISDOMAIN="radix.mine.nu"

_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 7:14 pm    Post subject: Reply with quote

Are you using dhcp to push an ip address and nameserver to your wireless linux box? IMHO, it would be easier to configure this if you have a static ip address for your linux box. Reading the following comment in /etc/conf.d/domainname, I gather you need to setup your domainname in resolv.conf and in /etc/hosts.

Code:
# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).
#
DNSDOMAIN="radix.mine.nu"

If you are using dhcp and the address your dlink is assigning to the wireless device on your linux box will always be the same, then it's easy to add it to your /etc/hosts file. If it keeps changing from dhcp, you'll have to keep changing the /etc/hosts file to the current ip address.

Do you have:
Code:
domain radix.mine.nu

in /etc/resolv.conf and
Code:
<wireless-device-ipaddress>   radix.mine.nu

in /etc/hosts ?

Are you using NIS?
Code:
# This only set what /bin/hostname returns.  If you need to setup NIS, meaning
# what /bin/domainname returns, please see:
#
#   http://www.linux-nis.org/nis-howto/HOWTO/
#
NISDOMAIN="radix.mine.nu"

If not, comment out the NISDOMAIN line.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 7:19 pm    Post subject: Reply with quote

This is where I become unclear. First of all, my dlink router give me the same IP though DHCP every time (with some static DHCP IP address feature or something). So I have the domain name radix.mine.nu that I got form http://www.dyndns.org and I want to use that as my domain name. I guess I'm not sure how to set this up - It used to work the way I have it now but it doesnt any more.

My /etc/resolv.conf now looks like this:
Code:
nameserver 192.168.0.1
search clvdoh.adelphia.net
domain radix.mine.nu


and my /etc/hosts looks like this (as specified by the wiki docs):
Code:
127.0.0.1       OptimusPrime.radix.mine.nu OptimusPrime localhost.localdomain localhost

_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 7:40 pm    Post subject: Reply with quote

This is something I dont understand:
/etc/init.d/hostname restart wrote:
* Setting DNS domainname to radix.mine.nu ... [ ok ]
OptimusPrime ~ # dnsdomainname
mine.nu


why is the dnsdomainname still set to mine.nu even after it was explicitly set to radix.mine.nu?
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 7:45 pm    Post subject: Reply with quote

Do you have dns running locally i.e. named/bind? Or do you rely on your provider's dns?
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 7:46 pm    Post subject: Reply with quote

i'm not running named or bind.
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 8:10 pm    Post subject: Reply with quote

So, you rely on your provider for domain name resolution. Right?
I'm not familar with the dlink capabilities. Does it have dns capabilities? resolv.conf is the file that tells your linux box which dns servers to check
Quote:
My /etc/resolv.conf now looks like this:
Code:
nameserver 192.168.0.1
search clvdoh.adelphia.net
domain radix.mine.nu

Code:
nameserver 192.168.0.1

is telling your linux box to check 192.168.0.1 for dns. I'm assuming this is you r dlink router. Correct? Try changing you resolv.conf to this:
Code:
domain radix.mine.nu
search radix.mine.nu
nameserver 24.50.78.2
nameserver 68.168.224.177
nameserver 68.168.192.17

Those are adelphia's name servers.
Quote:
and my /etc/hosts looks like this (as specified by the wiki docs):
Code:
127.0.0.1       OptimusPrime.radix.mine.nu OptimusPrime localhost.localdomain localhost

Try changing /etc/hosts to:
Code:
127.0.0.1        localhost.localdomain localhost
<eth1 ipaddress>     OptimusPrime.radix.mine.nu OptimusPrime radix.mine.nu

What do you get?
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1219
Location: Motown

PostPosted: Sat Jun 04, 2005 8:11 pm    Post subject: Reply with quote

BlindSpy wrote:
baselayout-1.11.12-r4


It does seem like something has changed as the "hostname" command now works differently for me. I don't know if it happened right at this release or earlier as it's not something i usually check (but I saw this thread and...).

Previously "hostname -f" would give my the FQDN of my system, "hostname -d" the domain name, and "hostname" just the name of the host.

Now "hostname -d" returns nothing, and "hostname -f" returns "localhost". If I reorder the 127.0.0.1 entry in /etc/hosts so that the FQDN is first:
Code:
127.0.0.1 f.q.d.n hostname localhost
the hostname commands return the proper info as previously (but I didn't need that explicit order before).

And yes, /etc/conf.d/domainname has the proper information.

Don't know why the change in behavior.

Also check to make sure the previous hostname and dnsdomainname files in /etc have been deleted (these were used by some earlier baselayout versions).

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 8:16 pm    Post subject: Reply with quote

Thanks for chime'n in, darkphader.

I believe the change in behavior is with the new baselayout, which is still masked. And since I don't have it, I can't test it on my my rig.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 04, 2005 10:56 pm    Post subject: Reply with quote

Thank you both for your help but I feel that this assistance has gone beyond the scope of my initial question and has been narrowed down enough that it is just a matter of me researching the topic. Thanks again for all your help guys and expecially overkll :D
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jun 04, 2005 11:09 pm    Post subject: Reply with quote

You're welcome, BlindSpy. I was beginning to wonder if you got it all sorted out or not. Good Luck!
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sun Jun 05, 2005 7:53 am    Post subject: Reply with quote

nope not sorted out yet =(. I tried using the adelphia dns servers directly but that doesnt work. The only time I can get any dns lookup is if I have my router as the nameserver which is strange. Since you mentioned it, it doesnt seem logical that a little 4 port wireless dlink router has a dns server. My guess is that my computer queries my router which queries adelphias dns. If that was the case, my setup should work though.

... There's just something I'm not seeing here.
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sun Jun 05, 2005 8:42 am    Post subject: Reply with quote

in my issue file I changed a \O to a \o and it seems to display the domainname now instead of the dnsdomainname (which was shorter than what it should have been) I guess its working now. Anyone know what the dif between \O and \o is?
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sun Jun 05, 2005 3:00 pm    Post subject: Reply with quote

Now that you mention \O \o, I don't think I've every seen a FQDN that uses uppercase. That might not be allowed, just as the character " _ " is not allowed in a domain name.

Yeah, you are probably right about the dns, however, you got me thinking about a related issue. Your domain name, radix.mine.nu is from dyndns.org. So dyndns.org is the authority of your domain. It would seem to me that if you have your hostname(s) (like optimusprime.radix.mine.nu) in your /etc/hosts file, any program that is able to use the hosts file for name resolution will be able to find the host(s). But, if for some reason the program can't/doesn't use the host file and uses dns instead, the host(s) would be not found - unless you've added the host to your domain at dyndns.org. I'm curious if this is the case or not.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Mon Jun 06, 2005 5:32 am    Post subject: Reply with quote

well it used to work with uppercase and I tried it with lowercase like yesterday just to eliminate that as a problem. The main places i've been noticing the problem are with programs that claim to use /etc/hosts or (in the case of GNOME) print an error when I boot saying "Cant find your hostname. try fixing /etc/hosts" or something along those lines.
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum