WiFi connection overwrites /etc/resolv.conf - Solaris

This is a discussion on WiFi connection overwrites /etc/resolv.conf - Solaris ; I've got a Sony laptop on which I installed Solaris Express Developer Edition (9/08, ISO is sol-nv-b70b-x86-dvd.iso). It detects my WiFi connection (D-link DWL-700AP) in the house, and puts the IP address of the wireless access point (192.168.0.50) in /etc/resolve.conf ...

+ Reply to Thread
Results 1 to 15 of 15

Thread: WiFi connection overwrites /etc/resolv.conf

  1. WiFi connection overwrites /etc/resolv.conf

    I've got a Sony laptop on which I installed Solaris Express Developer
    Edition (9/08, ISO is sol-nv-b70b-x86-dvd.iso).

    It detects my WiFi connection (D-link DWL-700AP) in the house, and puts
    the IP address of the wireless access point (192.168.0.50) in
    /etc/resolve.conf

    nameserver 192.168.0.50

    That happens automatically - i.e. some automatic process is editing
    /etc/resolv.conf

    Unfortunately, my wireless access point has nowhere in its setup where I
    can configure the IP addresses of my ISP's DNS servers. Hence devices
    connected can't find the IPs for the DNS servers. I keep thinking of
    getting a new access point (its only 11 Mbit/s), but it works, so I have
    not updated it.

    Under Windows, I simply enter the IP addresses of the DNS servers, so
    Windows can resolve domain names to IP addresses. I thought I could do
    the same in Solaris, by editing /etc/resolv.conf and adding the two IP
    addresses for my ISP's DNS servers. The problem is, whatever is
    detecting the WiFi, also overwrites /etc/resolv.conf. So unless I edit
    the file each time the laptop connects to the access point, the
    nameservers are getting reset to something which does not work.

    I don't know what process overwrites the file. Is it possible to get it
    to append to the file, rather than overwrite it?


    That said, since I only just installed this, I logged in as root. I
    assume as a normal user, the contents of /etc/resolv.conf will not be
    overwritten. So where would the IP addresses of the DNS servers be
    stored then?

  2. Re: WiFi connection overwrites /etc/resolv.conf

    Dave wrote:

    > I've got a Sony laptop on which I installed Solaris Express Developer
    > Edition (9/08, ISO is sol-nv-b70b-x86-dvd.iso).
    >
    > It detects my WiFi connection (D-link DWL-700AP) in the house, and puts
    > the IP address of the wireless access point (192.168.0.50) in
    > /etc/resolve.conf
    >
    > nameserver 192.168.0.50
    >
    > That happens automatically - i.e. some automatic process is editing
    > /etc/resolv.conf
    >
    > Unfortunately, my wireless access point has nowhere in its setup where I
    > can configure the IP addresses of my ISP's DNS servers. Hence devices
    > connected can't find the IPs for the DNS servers. I keep thinking of
    > getting a new access point (its only 11 Mbit/s), but it works, so I have
    > not updated it.
    >
    > Under Windows, I simply enter the IP addresses of the DNS servers, so
    > Windows can resolve domain names to IP addresses. I thought I could do
    > the same in Solaris, by editing /etc/resolv.conf and adding the two IP
    > addresses for my ISP's DNS servers. The problem is, whatever is
    > detecting the WiFi, also overwrites /etc/resolv.conf. So unless I edit
    > the file each time the laptop connects to the access point, the
    > nameservers are getting reset to something which does not work.
    >
    > I don't know what process overwrites the file. Is it possible to get it
    > to append to the file, rather than overwrite it?
    >
    >
    > That said, since I only just installed this, I logged in as root. I
    > assume as a normal user, the contents of /etc/resolv.conf will not be
    > overwritten. So where would the IP addresses of the DNS servers be
    > stored then?


    Did you try write protecting it?

    --
    The e-mail address in our reply-to line is reversed in an attempt to
    minimize spam. Our true address is of the form che...@prodigy.net.

  3. Re: WiFi connection overwrites /etc/resolv.conf

    In alt.solaris.x86 Dave wrote:
    > I've got a Sony laptop on which I installed Solaris Express Developer
    > Edition (9/08, ISO is sol-nv-b70b-x86-dvd.iso).
    >
    > It detects my WiFi connection (D-link DWL-700AP) in the house, and puts
    > the IP address of the wireless access point (192.168.0.50) in
    > /etc/resolve.conf
    >
    > nameserver 192.168.0.50
    >
    > That happens automatically - i.e. some automatic process is editing
    > /etc/resolv.conf
    >


    That doesn't sound like the action of wificonfig. Are you using DHCP,
    perhaps? There is a bit of recent discussion on opensolaris.org which may
    be relevant to you. a search for wifi and resolv.conf brings a useful
    looking stuff.

    If you are only using this for wifi on some known networks you may find it
    simpler to configure manually rather than using DHCP. I have always found
    DHSP good for getting IP addresses, but much less so for anything else.


    --
    Dr Tristram J. Scott
    Energy Consultant

  4. Re: WiFi connection overwrites /etc/resolv.conf

    On Nov 21, 2:20 am, Dave wrote:

    > I don't know what process overwrites the file. Is it possible to get it
    > to append to the file, rather than overwrite it?


    It's the DHCP client. Presumably the access point has a DHCP server
    which is handing out its own address as the DNS server.

  5. Re: WiFi connection overwrites /etc/resolv.conf

    Tim Bradshaw wrote:
    > On Nov 21, 2:20 am, Dave wrote:
    >
    >> I don't know what process overwrites the file. Is it possible to get it
    >> to append to the file, rather than overwrite it?

    >
    > It's the DHCP client. Presumably the access point has a DHCP server
    > which is handing out its own address as the DNS server.


    Yes, I think so. I can't see any way to configure it to send out another
    address.

    Unlike many people, I do not have a combined router with wireless access
    point - they are totally searate. I don't know how to get the wireless
    access point's DHCP server send a valid address. I can only enable or
    disable the server - not set the address of the DNS servers.

  6. Re: WiFi connection overwrites /etc/resolv.conf

    CJT wrote:
    > Dave wrote:
    >
    >> I've got a Sony laptop on which I installed Solaris Express Developer
    >> Edition (9/08, ISO is sol-nv-b70b-x86-dvd.iso).
    >>
    >> It detects my WiFi connection (D-link DWL-700AP) in the house, and
    >> puts the IP address of the wireless access point (192.168.0.50) in
    >> /etc/resolve.conf
    >>
    >> nameserver 192.168.0.50
    >>
    >> That happens automatically - i.e. some automatic process is editing
    >> /etc/resolv.conf
    >>
    >> Unfortunately, my wireless access point has nowhere in its setup where
    >> I can configure the IP addresses of my ISP's DNS servers. Hence
    >> devices connected can't find the IPs for the DNS servers. I keep
    >> thinking of getting a new access point (its only 11 Mbit/s), but it
    >> works, so I have not updated it.
    >>
    >> Under Windows, I simply enter the IP addresses of the DNS servers, so
    >> Windows can resolve domain names to IP addresses. I thought I could do
    >> the same in Solaris, by editing /etc/resolv.conf and adding the two IP
    >> addresses for my ISP's DNS servers. The problem is, whatever is
    >> detecting the WiFi, also overwrites /etc/resolv.conf. So unless I edit
    >> the file each time the laptop connects to the access point, the
    >> nameservers are getting reset to something which does not work.
    >>
    >> I don't know what process overwrites the file. Is it possible to get
    >> it to append to the file, rather than overwrite it?
    >>
    >>
    >> That said, since I only just installed this, I logged in as root. I
    >> assume as a normal user, the contents of /etc/resolv.conf will not be
    >> overwritten. So where would the IP addresses of the DNS servers be
    >> stored then?

    >
    > Did you try write protecting it?
    >



    I know this sounds stupid, but I did not!! Not sure what planet I was
    on! However, it would be nice to get it to work without that, as then it
    could work in any location (I often use the laptop away from home - the
    whole point of a laptop I guess)

  7. Re: WiFi connection overwrites /etc/resolv.conf

    On Wed, 21 Nov 2007 15:14:36 +0000, Dave wrote:

    >Tim Bradshaw wrote:
    >> On Nov 21, 2:20 am, Dave wrote:
    >>
    >>> I don't know what process overwrites the file. Is it possible to get it
    >>> to append to the file, rather than overwrite it?

    >>
    >> It's the DHCP client. Presumably the access point has a DHCP server
    >> which is handing out its own address as the DNS server.

    >
    >Yes, I think so. I can't see any way to configure it to send out another
    >address.
    >
    >Unlike many people, I do not have a combined router with wireless access
    >point - they are totally searate. I don't know how to get the wireless
    >access point's DHCP server send a valid address. I can only enable or
    >disable the server - not set the address of the DNS servers.


    There are probably several ways to skin this cat.

    1) Configure your Solaris box to use a fixed IP address and manually
    enter all the networking configuration stuff. Either turn off the
    DHCP server capability in your AP, or pick an address for the Sol box
    outside the range that the AP assigns.

    (or)

    2) Set up your AP to _get_ an address assigned to _it_ by the upstream
    router. This will/might/probably will cause it to pass the router's
    DNS server entries along to the Solaris box. You may want to turn
    off the DHCP server function in the AP so that the Solaris box's
    address and DNS info is also assigned by the upstream router. That
    just turns the AP into a wired/wireless connector.

    I'm no networking expert. Just tossing out a few random thoughts...

    Bill
    --
    William D Waddington
    william.waddington@beezmo.com
    "Even bugs...are unexpected signposts on
    the long road of creativity..." - Ken Burtch

  8. Re: WiFi connection overwrites /etc/resolv.conf

    On Nov 21, 3:14 pm, Dave wrote:

    >
    > Unlike many people, I do not have a combined router with wireless access
    > point - they are totally searate. I don't know how to get the wireless
    > access point's DHCP server send a valid address. I can only enable or
    > disable the server - not set the address of the DNS servers.


    That's what we do. But we use the router's DHCP server (which I know
    how to configure) and turn off the one in the AP - that works fine
    because it's only really a bridge in networking terms: it lives in the
    same broadcast domain as the router.

  9. Re: WiFi connection overwrites /etc/resolv.conf

    CJT wrote:
    > Dave wrote:
    >
    >> I've got a Sony laptop on which I installed Solaris Express Developer
    >> Edition (9/08, ISO is sol-nv-b70b-x86-dvd.iso).
    >>
    >> It detects my WiFi connection (D-link DWL-700AP) in the house, and
    >> puts the IP address of the wireless access point (192.168.0.50) in
    >> /etc/resolve.conf
    >>
    >> nameserver 192.168.0.50
    >>
    >> That happens automatically - i.e. some automatic process is editing
    >> /etc/resolv.conf
    >>
    >> Unfortunately, my wireless access point has nowhere in its setup where
    >> I can configure the IP addresses of my ISP's DNS servers. Hence
    >> devices connected can't find the IPs for the DNS servers. I keep
    >> thinking of getting a new access point (its only 11 Mbit/s), but it
    >> works, so I have not updated it.
    >>
    >> Under Windows, I simply enter the IP addresses of the DNS servers, so
    >> Windows can resolve domain names to IP addresses. I thought I could do
    >> the same in Solaris, by editing /etc/resolv.conf and adding the two IP
    >> addresses for my ISP's DNS servers. The problem is, whatever is
    >> detecting the WiFi, also overwrites /etc/resolv.conf. So unless I edit
    >> the file each time the laptop connects to the access point, the
    >> nameservers are getting reset to something which does not work.
    >>
    >> I don't know what process overwrites the file. Is it possible to get
    >> it to append to the file, rather than overwrite it?
    >>
    >>
    >> That said, since I only just installed this, I logged in as root. I
    >> assume as a normal user, the contents of /etc/resolv.conf will not be
    >> overwritten. So where would the IP addresses of the DNS servers be
    >> stored then?

    >
    > Did you try write protecting it?
    >



    This is odd. Even after write protecting the file (chmod 444), it still
    gets overwritten, and gets it permissions set to 644.

    As someone else pointed out, there is more than one way of skinning this
    cat, but it is a bit annoying.

  10. Re: WiFi connection overwrites /etc/resolv.conf

    Dave writes:

    >This is odd. Even after write protecting the file (chmod 444), it still
    >gets overwritten, and gets it permissions set to 644.


    >As someone else pointed out, there is more than one way of skinning this
    >cat, but it is a bit annoying.


    Whenever something becomes a "primary" dhcp interface, its settings
    (from the DHCP server) are copied to /etc/resolv.conf.

    Casper

  11. Re: WiFi connection overwrites /etc/resolv.conf

    On 2007-11-22, Dave wrote:
    > CJT wrote:



    >> Did you try write protecting it?
    >>

    >
    >
    > This is odd. Even after write protecting the file (chmod 444), it still
    > gets overwritten, and gets it permissions set to 644.


    i imagine the setup scripts run as root, and can as they please....

    --
    "Be thankful that you have a life, and forsake your vain
    and presumptuous desire for a second one."
    [email me at huge {at} huge (dot) org uk]

  12. Re: WiFi connection overwrites /etc/resolv.conf

    Dave wrote:
    > CJT wrote:
    >> Dave wrote:
    >>> ...
    >>> That happens automatically - i.e. some automatic process is editing
    >>> /etc/resolv.conf
    >>> ...
    >>> I don't know what process overwrites the file. Is it possible to get
    >>> it to append to the file, rather than overwrite it?
    >>>
    >>> ...

    >>
    >> Did you try write protecting it?

    >
    > This is odd. Even after write protecting the file (chmod 444), it still
    > gets overwritten, and gets it permissions set to 644.
    >
    > As someone else pointed out, there is more than one way of skinning this
    > cat, but it is a bit annoying.


    1) resolve.conf is over-written, not edited. Usually the original
    file is moved someplace and a new file created in it's place.
    Using chmod 644 doesn't stop root from mucking about with this file,
    (not that mode 444 would either). Note in Unix usually its the
    directory permissions that control if a file can be moved or
    over-written via "mv" or "cp".

    2) It's not just wireless. Any utility that rebinds the "primary"
    NIC (including PPP, PPPoE, etc., causes the DHCP client to run,
    and that will update resolv.conf.

    3) Some DHCP clients have a config file that controls what you
    allow to happen to resolv.conf. Don't know about Solaris 10
    but the ISC DHCP client allows you to create a /etc/dhclient.conf
    file, which supports adding to and/or superseding the automatic
    entries put into resolv.conf.

    -Wayne

  13. Re: WiFi connection overwrites /etc/resolv.conf

    On 21 Nov., 03:20, Dave wrote:
    > It detects my WiFi connection (D-link DWL-700AP) in the house, and puts
    > the IP address of the wireless access point (192.168.0.50) in
    > /etc/resolve.conf
    >
    > nameserver 192.168.0.50


    That's what APs do, because they ususally run a DHCP as well as a DNS
    server. I don't know the DWL-700AP, but I expect it to serve DNS at
    192.168.0.50. What happens if you do:

    nslookup somehostname 192.168.0.50

    ?


  14. Re: WiFi connection overwrites /etc/resolv.conf

    Huge wrote:
    > On 2007-11-22, Dave wrote:
    >> CJT wrote:

    >
    >
    >>> Did you try write protecting it?
    >>>

    >>
    >> This is odd. Even after write protecting the file (chmod 444), it still
    >> gets overwritten, and gets it permissions set to 644.

    >
    > i imagine the setup scripts run as root, and can as they please....
    >

    You are probably right, as a normal user has to be able to log in and
    this work.

    I'm quite busy now, do have just taken a sledgehammer to crack a walnut
    and set up a cron job to overwrite the file every few minutes. I will
    look at it a bit more later, but for now I have more pressing issues.

  15. Re: WiFi connection overwrites /etc/resolv.conf

    On Fri, 23 Nov 2007 11:30:48 +0000, Dave wrote:

    >Huge wrote:
    >> On 2007-11-22, Dave wrote:
    >>> CJT wrote:

    >>
    >>
    >>>> Did you try write protecting it?
    >>>>
    >>>
    >>> This is odd. Even after write protecting the file (chmod 444), it still
    >>> gets overwritten, and gets it permissions set to 644.

    >>
    >> i imagine the setup scripts run as root, and can as they please....
    >>

    >You are probably right, as a normal user has to be able to log in and
    >this work.
    >
    >I'm quite busy now, do have just taken a sledgehammer to crack a walnut
    >and set up a cron job to overwrite the file every few minutes. I will
    >look at it a bit more later, but for now I have more pressing issues.


    Respectfully, IMNSHO, you are fighting the wrong battle It seems
    that your Solaris networking stuff is working as intended. It's your
    network that's hinky.

    Maybe take that hammer to your access point when you get around to it.

    Bill
    --
    William D Waddington
    william.waddington@beezmo.com
    "Even bugs...are unexpected signposts on
    the long road of creativity..." - Ken Burtch

+ Reply to Thread