[GLLUG] ubuntu autochanging of /etc/resolv.conf and 192.168.1.64

Nihal Sinha nihals at gmail.com
Tue Sep 12 13:12:15 EDT 2006


Scott,

Here's a snippet from a /etc/network/interfaces file:

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.37.3
        netmask 255.255.255.0
        up route add default gw 192.168.37.2 netmask 0.0.0.0

Notice the syntax of this snippet and the last line.  The 'up' command
executes whatever follows it at the time the network interface goes up, so
the above lines will add a default route as eth0 goes up.  I imagine you can
use the same method to modify your /etc/resolv.conf file.  As Clay
mentioned, it's probably DHCP that's assigning the DNS/IP, and I believe
changing the /etc/network/interfaces file to use a static IP should
hopefully resolve that issue.

Hope this helps,
Nihal



On 9/12/06, Scott Harrison <harris41 at msu.edu> wrote:
>
> Hi,
>
>
> Here is my current situation.  I am booting from
> ubuntu live cd desktop version 6.06.1.
> Please see my silly perl scripts below, and
> help me find a better way!
>
>
> If I don't do this,
> perl -e 'while(1) {sleep(1);`echo "nameserver 35.8.2.41" >
> /etc/resolv.conf`;}' &
>
>
> I then, after a few minutes, wind up with this:
> root at ubuntu:~# more /etc/resolv.conf
> search domain_not_set.invalid
> nameserver 192.168.0.1
>
>
> Also, I am doing this:
> perl -e while(1) {sleep(1);`ifconfig eth0 192.168.2.1 netmask
> 255.255.255.0`;}?
>
>
> because something in the system is auto-assigning
> 192.168.1.64 to eth0.
>
>
> I tried adjusting
> auto eth0
> iface eth0 inet dhcp
>
>
> to be
> auto eth0
> iface eth0 inet 192.168.2.1
>
>
> Also, for my LAN, I adapted various iptables commands
> from http://www.tldp.org/HOWTO/Masquerading-Simple-HOWTO/summary.html
> to help allow other LAN computers to access the internet.
> I am wanting to use ubuntu live cd as a failsafe internet connection
> tool for my LAN, but it seems cumbersome to
> store/transcribe/thumbdrive/remixlivecd all those
> iptable commands.  Is there a simple GUI or countably few
> set of commands to do something similar?
>
>
> I'm still in a happy place, but I must face Darth Vader
> (aka these bugs and issues) again, and this mailing list
> is my only hope.
>
>
> Scott
>
> -----
>
>
> *******************
> ** DISCLAIMER :P **
> *******************
>
> This E-mail message and any attachments may contain information.
>
>
> _______________________________________________
> linux-user mailing list
> linux-user at egr.msu.edu
> http://mailman.egr.msu.edu/mailman/listinfo/linux-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.egr.msu.edu/mailman/public/linux-user/attachments/20060912/2e8ac51c/attachment-0001.html


More information about the linux-user mailing list