Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] DNS not resolving names

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

[SOLVED] DNS not resolving names

  • Quote

Post by SnackMasterX » Fri Mar 30, 2012 10:51 pm

Hello,

The topic name pretty much sums it up, I am able to ping inside and outside IP addresses but when I try to ping google.com I get an unknown host response from ping. I checked my network settings (I have DHCP enabled) and I do infact have nameservers in the /etc/resolve.conf so I decided to load up a live CD and I can ping with no problems from the live session. I chrooted to my gentoo install (making sure to copy the resolv.conf just incase) and after chrooting to my gentoo install I could no longer ping so there must be some broken package and I'm not too sure where to begin. I've tried running revdep-rebuild which found python 2.7 and cairo to be broken so it remerged them but still nothing after that (though I wasn't expecting either of those, especially cairo, to fix this). I am suspecting it might be something to do with my use flags or package.use file args. Just as a note this make.conf is super old (my brother gave it to me 4+ years ago) and I haven't really done anything to it aside from try to stop evolution flags from being used so if anyone has any suggestions for changes please let me know because when I tried to update the use flags, terrible things happened to my system.


make.conf

Code: Select all

  GNU nano 2.3.1                                                                            File: /etc/make.conf                                                                                                                                                              

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-O2 -pipe"
#CXXFLAGS="-O2 -pipe"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
#CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
#USE="mmx sse sse2"

# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-src/portage/cnf/make.conf.x86,v 1.5.2.4 2005/02/15 23:27:44 jstubbs Exp $
# Contains local system settings for Portage system
USE_HARDWARE="3dnow 3dnowext acpi -apm lm_sensors mmx mmxext nvidia sse sse2 usb udev"
#USE_PRINTING="cups print printer scanner"
USE_CDR="cdr dvdr dvdread dvdnav"
USE_SOUND="alsa -arts -esd -oss gstreamer pulseaudio"
USE_MM_LIBS="a52 aac dts dvd flac mad mp3 mpeg !gnutls ogg vorbis win32codecs tiff"
USE_MM_GFX="exif gimp visualization encode xine"
USE_MM_VIDEO="ffmpeg glitz glut opengl sdl svg theora x264 xv xvid xvmc"
USE_LANGS="-fortran -ldap lirc -motif -tcl -tk java"
USE_LIBS="-avahi bzip2 curl -gpm libsamplerate mono zeroconf xml gd perl static-libs static"
USE_SOFTWARE_DOCS="-doc pdf spell"
USE_SOFTWARE_GNOME="beagle branding dbus -eds -evo galago gtk gtk2 gnome gstreamer hal libnotify nautilus policykit tracker gdu"
USE_SOFTWARE_KDE="qt3 -qt4 -kde"
#USE_SOFTWARE_MOZ="firefox mozbranding mozsvg nsplugin"
USE_SOFTWARE_X="X cairo dri startup-notification truetype xcb xinerama xscreensaver"
USE_VCS="-cvs svn subversion"
USE_SYSTEM="-kerberos networkmanager nls ntpl ntplonly samba tcpd threads unicode xattr -server"
USE_MISC="jpeg png secure-delete consolekit extras autoipd bash-completion dvb ipod mythtv offensive vim-syntax device-mapper -dso mdnsresponder-compat g3dvl"
USE="${USE_HARDWARE} ${USE_PRINTING} ${USE_CDR} ${USE_SOUND} ${USE_LANGS} ${USE_MM_LIBS} ${USE_MM_GFX} ${USE_MM_VIDEO} ${USE_LIBS} ${USE_SOFTWARE_X} ${USE_SOFTWARE_MOZ} ${USE_SOFTWARE_KDE} ${USE_SOFTWARE_GNOME} ${USE_SOFTWARE_DOCS} ${USE_SYSTEM} ${USE_VCS} ${USE_MISC}"

LINGUAS="en en_US en_GB"

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
ACCEPT_KEYWORDS="~amd64"
MAKEOPTS="-j5"
#PORTAGE_NICENESS=9
PORT_LOGDIR=/var/log/portage
#PORTDIR_OVERLAY=/usr/local/portage
PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_TMPFS="/dev/shm"
FEATURES="parallel-fetch"
#ALSA_CARDS="intel8x0"
INPUT_DEVICES="evdev"
#VIDEO_CARDS="fglrx"
VIDEO_CARDS="nvidia"
USE_PYTHON="2.7"
GENTOO_MIRRORS="ftp://mirrors.tera-byte.com/pub/gentoo ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://archive.mmu.edu.my/gentoo rsync://gentoo.bloodhost.ru/gentoo-distfiles ftp://gentoo.mirrors.tds.net/gentoo ftp://ftp.halifax.rwth-aachen.de/gentoo/ rsync://m$


SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"

ACCEPT_LICENSE="*"
#source /usr/local/portage/layman/make.conf

package.use

Code: Select all

#>=dev-vcs/subversion-1.7.4 -dso
>=dev-libs/icedtea-bin-7.2.1-r1 -X
#>=app-text/ghostscript-gpl-9.05 cups
>=dev-libs/libxml2-2.7.8-r5 python
>=media-libs/libjpeg-turbo-1.2.0-r1 -java
>=net-print/cups-1.5.2-r1 -java
>=sys-apps/sed-4.2.1-r1 -acl
>=sys-apps/coreutils-8.15 -static
>=sys-fs/udev-182-r2 hwdb gudev
>=gnome-base/gvfs-1.10.1 cdda
>=net-misc/curl-7.25.0 nss
>=gnome-extra/nm-applet-0.9.4.1 bluetooth
>=net-libs/gtk-vnc-0.5.0 gtk3

Just so you can see, here is my resolv.conf, though this is the one that was generated by the live CD and not dhcp on my system

Code: Select all

# Generated by resolvconf
search cfl.rr.com
nameserver 8.8.4.4
nameserver 8.8.8.8

Also for fun:

Code: Select all

gentoo / # ping google.com
ping: unknown host google.com
gentoo / # ping 74.125.229.197
PING 74.125.229.197 (74.125.229.197) 56(84) bytes of data.
64 bytes from 74.125.229.197: icmp_req=1 ttl=50 time=22.5 ms
64 bytes from 74.125.229.197: icmp_req=2 ttl=50 time=16.9 ms
64 bytes from 74.125.229.197: icmp_req=3 ttl=51 time=17.0 ms
64 bytes from 74.125.229.197: icmp_req=4 ttl=51 time=16.0 ms
64 bytes from 74.125.229.197: icmp_req=5 ttl=51 time=17.0 ms
^C
--- 74.125.229.197 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 16.092/17.952/22.563/2.334 ms
gentoo / # 
If there is anything I didn't cover that you need please let me know, thanks in advance!
Last edited by SnackMasterX on Sat Mar 31, 2012 5:53 pm, edited 3 times in total.
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Fri Mar 30, 2012 10:58 pm

There are a few items I added to the make.conf that I forgot to mention previously, the g3dvl, static and static-libs. Only a few packages needed them (not sure why) but when I tried to assign them through the package.use those packages still complained that they needed them until I made it a global change instead.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

Re: DNS not resolving names

  • Quote

Post by cach0rr0 » Sat Mar 31, 2012 4:05 am

SnackMasterX wrote: Just so you can see, here is my resolv.conf, though this is the one that was generated by the live CD and not dhcp on my system
pertinent, is going to be what's in /etc/resolv.conf from within your actual system

that'd be what I'm most curious about for starters.
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 4:49 am

Not really that different:

Code: Select all

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain cfl.rr.com
nameserver 8.8.4.4
nameserver 8.8.8.8
# /etc/resolv.conf.tail can replace this line
Only difference between the 2 files are the comments. Also to clarify, DNS is functioning on the live CD but once I chroot to my gentoo install from the live CD and I'm working off that environment, domain names won't resolve (ping doesn't work)
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 5:08 am

I also managed to remove the 3 use flags from the make.conf that I was having issues with originally and tag them to specific packages that needed them and I'm recompiling over 100 packages, so we'll see what this does. The flags I removed were "static g3dvl static-libs" and my new package.use file looks like this:

Code: Select all

#>=dev-vcs/subversion-1.7.4 -dso
>=dev-libs/icedtea-bin-7.2.1-r1 -X
#>=app-text/ghostscript-gpl-9.05 cups
>=dev-libs/libxml2-2.7.8-r5 python
>=media-libs/libjpeg-turbo-1.2.0-r1 -java
>=net-print/cups-1.5.2-r1 -java
>=sys-apps/sed-4.2.1-r1 -acl
>=sys-apps/coreutils-8.15 -static
>=sys-fs/udev-182-r2 hwdb gudev static-libs
>=gnome-base/gvfs-1.10.1 cdda
>=net-misc/curl-7.25.0 nss
>=gnome-extra/nm-applet-0.9.4.1 bluetooth
>=net-libs/gtk-vnc-0.5.0 gtk3
>=sys-apps/util-linux-2.21 static-libs
>=dev-libs/libgpg-error-1.10-r1 static-libs
>=sys-fs/cryptsetup-1.4.1-r1 static
>=dev-libs/popt-1.16-r1 static-libs
>=sys-fs/lvm2-2.02.95 static-libs
>=dev-libs/libgcrypt-1.5.0-r2 static-libs
>=media-libs/mesa-8.0.2 g3dvl
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Sat Mar 31, 2012 5:14 am

IMHO, take ping out of the equation for the time being

Code: Select all

emerge -av bind-tools
then do something like host -t A google.com 8.8.8.8

see if that returns anything.

also, what's the output of:

Code: Select all

cat /etc/conf.d/net
ifconfig -v
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 5:36 am

I can't emerge the program you asked because I have no internet connectivity on my gentoo install. Trying to find the package name so I can download it directly from a mirror and move it from my live CD to my distfiles folder but it seems to not be bind-tools for in the mirror distfile folders however here is the other information requested:

Code: Select all

# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).

config_eth0="dhcp"

ifconfig -v

Code: Select all

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.104  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::6e62:6dff:fede:d50  prefixlen 64  scopeid 0x20<link>
        ether 6c:62:6d:de:0d:50  txqueuelen 1000  (Ethernet)
        RX packets 87390  bytes 121298709 (115.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50707  bytes 5119691 (4.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 43  base 0xe000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 12  bytes 656 (656.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 656 (656.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:26:5a:bb:e8:14  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 5:44 am

Code: Select all

gentoo / # host -t A google.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases: 

google.com has address 74.125.229.206
google.com has address 74.125.229.195
google.com has address 74.125.229.198
google.com has address 74.125.229.199
google.com has address 74.125.229.194
google.com has address 74.125.229.201
google.com has address 74.125.229.192
google.com has address 74.125.229.196
google.com has address 74.125.229.197
google.com has address 74.125.229.200
google.com has address 74.125.229.193
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 6:14 am

Everything finished merging and no difference :-(
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Sat Mar 31, 2012 6:17 am

SnackMasterX wrote:

Code: Select all

gentoo / # host -t A google.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases: 

google.com has address 74.125.229.206
google.com has address 74.125.229.195
google.com has address 74.125.229.198
google.com has address 74.125.229.199
google.com has address 74.125.229.194
google.com has address 74.125.229.201
google.com has address 74.125.229.192
google.com has address 74.125.229.196
google.com has address 74.125.229.197
google.com has address 74.125.229.200
google.com has address 74.125.229.193
is this from your actual install, or from the livecd?
because that would seem to indicate name resolution is working; just ping (ICMP) being an ass with name resolution

if you havent yet snagged it and dumped it into distfiles, this will work: http://gentoo.osuosl.org/distfiles/bind-9.9.0.tar.gz

do you have curl on your real install? If so, do another quick test:

Code: Select all

curl -I http://www.google.com
There's a method to my madness; trying to establish if it's a case of "other programs work, but ping does not"
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 2:51 pm

Code: Select all

gentoo ~ # mkdir /mnt/gentoo
gentoo ~ # mount /dev/sda
sda   sda1  sda2  sda3  
gentoo ~ # mount /dev/sda1 /mnt/gentoo/
gentoo ~ # mount -t proc none /mnt/gentoo/proc/
gentoo ~ # mount --rbind /dev /mnt/gentoo/dev/
gentoo ~ # chroot /mnt/gentoo/ /bin/bash
gentoo / # curl -I http://www.google.com
HTTP/1.1 200 OK
Date: Sat, 31 Mar 2012 14:50:48 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=903e12343bdbdb14:FF=0:TM=1333205448:LM=1333205448:S=W8_zCcYvYoQJqN0k; expires=Mon, 31-Mar-2014 14:50:48 GMT; path=/; domain=.google.com
Set-Cookie: NID=58=r2EgXafkBi4RbcP5wjlCaNskzw9m1Ll5dZmEQf3VKx7J4Z2CZAcozjxjUmAKalrRSzJvfBmDUEOSvwadZ3XkftwvKexLYBRatbBJXz-aOL8FzTbNEu2EfIL0hy0eqrFO; expires=Sun, 30-Sep-2012 14:50:48 GMT; path=/; domain=.google.com; HttpOnly
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked

gentoo / # 
The only reason you're seeing "gentoo" as the hostname is because of the live cd, otherwise it would be "Conquistador" :-P
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 2:54 pm

Ok... I am completely baffled, the whole reason I made this post and was using ping is because my hostnames were not resolving. I could not emerge --sync or do anything when it came to using a hostname but now everything seems to be working. I can't help but wonder if one of the use flags I removed last night had anything to do with it but I'll never know now probably :-\

Ran emerge --sync because I wanted to show my system not resolving the gentoo server names and it worked, so I tested ping again and that also worked.
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Mar 31, 2012 3:45 pm

Setting static on a global scale is a really bad idea. That may have contributed to your problems. Also, if you ever find yourself needing to download a file by hand, use emerge --pretend --fetchonly category/package, which will cause Portage to print the URLs that it would use if it were not pretending. You can then fetch those files by hand via LiveCD / sneakernet / etc.
Top
SnackMasterX
Apprentice
Apprentice
Posts: 231
Joined: Thu Jan 26, 2006 3:50 pm

  • Quote

Post by SnackMasterX » Sat Mar 31, 2012 5:52 pm

I was getting an error when I originally tried to set static to specific packages using package.use and I was using the live CD to fetch items for me then copy them over to my gentoo install's distfiles folder. Thanks for the help!
Top
Post Reply

14 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic