LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-04-2007, 06:12 PM   #1
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.2 & -current
Posts: 692

Rep: Reputation: 40
OpenDNS


Hi,

I've been trying to get OpenDNS working on my Slackbox...
Situation:
Two computers (Slack and Ubuntu/W2000) are connected via a router (Speedtouch 546) to the internet. Both using DHCP with their static IP's.
I got it going on Ubuntu, but not on Slackware, at least, not for longer than a reboot.
I tried netconfig and it works (using static IP's, instead of DHCP), but after a reboot, there is no connection (after setting the router up for static IP's).

From the site of OpenDNS:
Quote:
Using OpenDNS with DHCP

If you assign your computer's IP with DHCP, it probably overwrites your /etc/resolv.conf. Here's how to fix that:

1. Run: sudo gedit /etc/dhcp3/dhclient.conf
2. Change the prepend line to read:
Code:
 prepend domain-name-servers 208.67.222.222, 208.67.220.220;
This will prepend the OpenDNS addresses to the top of the list. (You can also use "supersede", which will just use them.) You don't have to worry about the DHCP client overwriting settings on each reboot or lease cycle, and your ISP nameservers will still be used as backup.
3. Run: sudo /etc/init.d/networking restart
But this is not the way it works on Slack. Anyone who has an idea how to get this working?
 
Old 05-04-2007, 06:40 PM   #2
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
Well, Slackware doesn't use dhclient, but dhcpcd.

(Assuming you haven't modified heavily your rc.inet1 file and you're running slack 11.0 (10.2?)) Try editing /etc/rc.d/rc.inet1.conf and adding
Code:
DHCP_KEEPRESOLV[0]="yes"
(You might have to change the array index appropiately).

That should tell dhcp to don't mess with your /etc/resolv.conf.
You might have to rewrite that file and most likely run as root "/etc/rc.d/rc.inet1 stop" before editing it and "/etc/rc.d/rc.inet1 start" after.

Last edited by theoffset; 05-04-2007 at 08:14 PM.
 
Old 05-04-2007, 08:20 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
Can't you change the router settings ... it's a better solution IMO. I know some routers won't (like mine), because they use an internal or built-in DNS. Ok, it's not really a DNS, but it caches resolves ... so it's similar.

Last edited by H_TeXMeX_H; 05-04-2007 at 08:21 PM.
 
Old 05-05-2007, 07:11 AM   #4
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.2 & -current
Posts: 692

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by theoffset
Well, Slackware doesn't use dhclient, but dhcpcd.

(Assuming you haven't modified heavily your rc.inet1 file and you're running slack 11.0 (10.2?)) Try editing /etc/rc.d/rc.inet1.conf and adding
Code:
DHCP_KEEPRESOLV[0]="yes"
(You might have to change the array index appropiately).

That should tell dhcp to don't mess with your /etc/resolv.conf.
You might have to rewrite that file and most likely run as root "/etc/rc.d/rc.inet1 stop" before editing it and "/etc/rc.d/rc.inet1 start" after.
Tried it, but no luck, I'm afraid.
After "/etc/rc.d/rc.inet1 start" everything is fine, but rebooting still rewrites /etc/resolv.conf...
I'm probably overlooking something, but what?
 
Old 05-05-2007, 07:14 AM   #5
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.2 & -current
Posts: 692

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by H_TeXMeX_H
Can't you change the router settings ... it's a better solution IMO. I know some routers won't (like mine), because they use an internal or built-in DNS. Ok, it's not really a DNS, but it caches resolves ... so it's similar.
I agree, but I've gone through the menu's and manual of the router several times and can't get this configured (if possible at all). If someone has an idea, I'd be grateful (like I said, it's a Speedtouch 546).
 
Old 05-05-2007, 07:19 AM   #6
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Try setting the /etc/resolv.conf file to immutable after entering the correct DNS entries:

chattr +i /etc/resolv.conf


at least until you come up with a better solution.
 
Old 05-05-2007, 05:18 PM   #7
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.2 & -current
Posts: 692

Original Poster
Rep: Reputation: 40
I got it going!
And indeed, OpenDNS is faster.
Thanks everyone for the hints & tips.

Had to turn off DHCP (off course also in the router) to get it going.
Now my Ubuntu/Windows box don't get connected, but I'll work it out.
 
Old 05-05-2007, 07:29 PM   #8
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.2 & -current
Posts: 692

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by adriv
Now my Ubuntu/Windows box don't get connected, but I'll work it out.
Done!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Faster, safer Internet with OpenDNS LXer Syndicated Linux News 0 01-31-2007 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration