On Wed, 2010-04-07 at 00:35 +0200, Joachim Ott wrote: > On 7 April 2010 00:19, Tim Abell <[email protected]> wrote: > > > > > > Joachim Ott wrote: > >> > >> On 6 April 2010 23:28, Tim Abell <[email protected]> wrote: > >> > >>> > >>> hello, > >>> > >>> sometimes when i plug my fr into my laptop, i can't always get internet > >>> from > >>> the phone via the laptop > >>> > >>> it seems the culprit is the contents of /etc/resolv.conf, which sometimes > >>> contains old settings, i think from my last gprs session (connected with > >>> mokonnect) > >>> > >>> it's only a minor annoyance, but can anything be done about this? > >>> > >>> my workaround is to ssh in and run > >>> echo 'nameserver 192.168.0.200' > /etc/resolv.conf > >>> > >> > >> What's your entry for usb0 in /etc/network/interfaces ? > >> > > > > ok, that's interesting, i hadn't realised that was in there. maybe i'm > > misreading the situation. > > it could actually be that dns isn't allowed out at work, and therefore the > > below doesn't work. > > > > ta > > > > Tim Abell > > > > ----- > > > > # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) > > > > # The loopback interface > > auto lo > > iface lo inet loopback > > > > # Wireless interfaces > > iface wlan0 inet dhcp > > wireless_mode managed > > wireless_essid any > > iface atml0 inet dhcp > > > > # Wired or wireless interfaces > > iface eth0 inet dhcp > > iface eth1 inet dhcp > > > > # Ethernet/RNDIS gadget (g_ether) > > # ... or on host side, usbnet and random hwaddr > > auto usb0 > > iface usb0 inet static > > address 192.168.0.202 > > netmask 255.255.255.0 > > network 192.168.0.0 > > up route add default gw 192.168.0.200 metric 8 > > up echo nameserver 208.67.222.222 > /etc/resolv.conf > > up echo nameserver 208.67.220.220 >> /etc/resolv.conf > > down route del default gw 192.168.0.200 metric 8 > > > > # Bluetooth networking > > iface bnep0 inet dhcp > > > > > > That 2 nameservers are are from opendns.com. I'm also not using them > because I'm doing something dirty right before the router, thus my > entry is: > > up echo nameserver 192.168.0.200 > /etc/resolv.conf > # up echo nameserver 208.67.222.222 > /etc/resolv.conf > # up echo nameserver 208.67.220.220 >> /etc/resolv.conf
>From what the original post said, it was after using gprs - Ive found that the auto setting in the interfaces file has not worked for a long time - you actually have to down/up the inetface to force it to rewrite the resolv.conf - I use an icon on the desktop running "ifdown usb0;ifup usb0" BillK _______________________________________________ Shr-User mailing list [email protected] http://lists.shr-project.org/mailman/listinfo/shr-user
