Jump to content

Resolv.conf problem Switching bw LAN and dialup


saurya_s
 Share

Recommended Posts

Hi guys

I have got linux on my laptop. I connect to LAN at work and when I bring it to home I use dialup.

Now, when I come to home, the dial up doesn't wok unless I remove the resolv.conf while which had DNS of my LAN. Actually, it connects to the ISP but webpages etc are not dispalyed unless i remove it.

Though it works perfectly at work ,probably because of DHCP.

 

Can I make it to work with dialup without removing resolv.conf of lan. I did try to put the DNS entry of dialup and LAN in resolv.conf but the problem still exists. I would like something as easy as Mac or Win whereby it detects LAN automatically, while it does the dialup when at home without playing with resolv.conf.

Thanks

SS

Link to comment
Share on other sites

That's what I would do. Prepare two copies of resolv.conf, one with LAN settings, another with settings for your dial-up connection. Call them /etc/resolv.conf.lan and /etc/resolv.conf.dialup, or whatever. Then modify scripts that activate network interfaces (ppp0 for dialup and eth0 when connected to LAN) to make them override /etc/resolv.conf by copying appropriate /etc/resolv.conf.xxx to /etc/resolv.conf

Link to comment
Share on other sites

I have the same issues as you, I just don't have different locations. I usually access the internet by way of a dialup proxy on a WinXP box that everyone shares. However, as I am having troubles accessing the ftp gateway on the proxy (see my other recent post), I try to use direct dialup from my MDK 9.2 box for the ftp access. This is not really that easy. I have to adjust many settings with respect to the proxy to even have a chance at accessing the ftp. I have never tried modifying the /etc/resolv.conf file as all the DNS addresses for the ISP are dynamic.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...