Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-27-2006, 07:52 AM
|
#16
|
LQ 5k Club
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,568
|
I have been looking at this problem as I have an ISP who firmly supports the Windows world and thinks nothing of changing DNS server addresses without notification. I offer the following hack which will work for a home user dialling out to an ISP:
1. If you add 'usepeerdns' to your /etc/ppp/options, then when pppd is started at the CLI by 'ppp-go' and pppd connects it will create a /etc/ppp/resolv.conf file. This file contains nameserver lines with the DNS server addresses that your ISP offers. Note that pppd must be started by root or pppd set to run as an suid program (like kppp) for this to occur. 'man pppd' will give further details.
2. To add the nameserver lines to your /etc/resolv.conf, you can add these lines to your /etc/ppp/ip-up script.
# /etc/resolv.conf contains a single line like 'search myISP.domain.name'
# Save a copy for later restoration by /etc/ppp/ip-down script
cp /etc/resolv.conf /etc/resolv.conf.orig
# Add the nameserver lines containing DNS server addresses to /etc/resolv.conf
cat /etc/ppp/resolv.conf >> /etc/resolv.conf
3. You must also clean up the altered /etc/resolv.conf when the ppp link is shutdown at the CLI using 'ppp-off'. This can be done by adding these lines to your /etc/ppp/ip-down script.
# Restore the original file that was altered by /etc/ppp/ip-up script
cp /etc/resolv.conf.orig /etc/resolv.conf
4. The above works for the root user, who has privileges to write to the /etc directory and to /etc/resolv.conf. To make this work for ordinary users requires making pppd an suid program.
|
|
|
02-28-2006, 01:12 AM
|
#17
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
I applaud your efforts to get the two config/connection methods to work together. Just want to point out that once you have an /etc/resolv.conf with DNS entries, when you connect your connection is not dynamically allocated. Instead pppd uses the addresses you gave it. No problem if you always use the same DNS servers.
If you manually edit your ppp scripts to create dynamic DNS server connection, then you just need to put 'usepeerdns' in your /ettc/ppp/options file and remove /etc/resolv.conf. When you connect, pppd will generate the /etc/ppp/resolv.conf with the currently allocated addresses. Many ISP's will time you out if your connection is inactive for awhile and your DNS address becomes stale. That's why there are lines in /etc/ppp/ip-up that will 'ping' your connection every few minutes -to keep the DNS addresses 'alive'.
The stuff in ip-down is just to clean up after the connection is down so that you start fresh next time, with truly dynamic DNS allocation. I wrote ISPSETUP when I was using a net-by-call dialup connection and never knew what my DNS addresses would be.
If your using ppp-on and ppp-off just so that you can control ppp from the command line, it seems better to use the command-line options for kppp as mentioned above, after doing the configuration with kppp.
|
|
|
02-28-2006, 07:41 AM
|
#18
|
LQ Newbie
Registered: Dec 2005
Posts: 12
Original Poster
Rep:
|
Allend:
I thank you for your suggestion. I tried it, and it didn't work. I unaliased "cp" to eliminate any wait for a response, and subsequent by-pass, but to no avail. My original solution still works fine for me, and I'll stick with it.
Thanks for the effort.
dbarn
|
|
|
03-01-2006, 06:29 AM
|
#19
|
LQ Newbie
Registered: Dec 2005
Posts: 12
Original Poster
Rep:
|
gnashley,
I tried once, via the command line instruction "kppp --help" / "kppp -c IP Acct. Name" - thea works from the command line (via "Alt-F2") , as long as I'm in the GUI window or have it open. "kppp -q (+ or - theIP acc. name) doesn't work at all to quit. You refer to "kppp command line options above" in your response, but I could not find them.
Thanks for your response.
dbarn.
|
|
|
All times are GMT -5. The time now is 04:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|