Trying to make DNS work

bum tradet.h at gmail.com
Wed Oct 8 12:50:35 CEST 2008


Okay. How shall I put the up echo in the file through neo?
I log in with ssh then...? Regularly I'd use gedit but now I can't.

I did the echo in the neo then
/etc/init.d/networking stop
But then the connection just hung...

On Wed, Oct 8, 2008 at 12:38 PM, David Samblas-3 <
ml-user+51344-1875701335 at n2.nabble.com<ml-user%2B51344-1875701335 at n2.nabble.com>
> wrote:

> El mié, 08-10-2008 a las 03:05 -0700, bum escribió:
> > Hello, ubuntu and openmoko newcomer here.
> >
> > I can successfully login to my freerunner with ssh and ping (ping
> > 74.125.19.147) to the outside world but I can't ping to an address (ping
>
> > www.google.com).
> >
> > I've tried most of the things
> > http://wiki.openmoko.org/wiki/USB_Networking#Configure_Default_Neo_DNS here
>
> > :
> > My IP changes so I can't use "echo nameserver 'myIP' > /etc/resolv.conf".
>
> >
> > echo nameserver 208.67.222.222 > /etc/resolv.conf
> > echo nameserver 208.67.220.220 >> /etc/resolv.conf
> > even if I don't understand it, but no luck. Getting error
> >
> > "treeman at treeman-PC:~$ sudo echo nameserver 208.67.222.222 >
> > /etc/resolv.conf
> > bash: /etc/resolv.conf: Permission denied"
> >
> > even with sudo... I dunno...
> You have to do the echo stuff in the neo not in you pc
> >
> > Tried placing
> > "up echo nameserver 208.67.222.222 > /etc/resolv.conf
> > up echo nameserver 208.67.220.220 >> /etc/resolv.conf"
> > in "/etc/network/interfaces" but no luck.
> this too has to be done in the neo
> after the interface modification do the following to make it active
> on the neo:
> /etc/init.d/networking stop
> /etc/init.d/networking start
>
>
> >
> > Proxying from desktop/laptop is the thing I'd want though as I have a
> laptop
> > :-D
> >
> > Tried dnrd but don't know if I did it right...
> >
> > treeman at treeman-PC:~$ sudo gedit /home/treeman/dnrd
> > [sudo] password for treeman:
> > (paste  http://buildhost.automated.it/gta01 dnrd script )
> > treeman at treeman-PC:~$ sudo chmod +x /home/treeman/dnrd
> > treeman at treeman-PC:~$ sudo /home/treeman/dnrd
> > /home/treeman/dnrd: line 97: -a: command not found
> >
> > UDP forwarding link didn't work.
> >
> > Iptables:
> > iptables -t nat -A PREROUTING -p tcp -s 192.168.0.202 -d 192.168.0.200
> > --dport domain -j DNAT --to-destination 192.168.0.1
> > iptables -t nat -A PREROUTING -p udp -s 192.168.0.202 -d 192.168.0.200
> > --dport domain -j DNAT --to-destination 192.168.0.1
> > no errors but didn't work.
> >
> > Also edited /etc/network/interfaces and added:
> >  # freerunner
> >  auto usb0
> >  iface usb0 inet static
> >         address 192.168.0.200
> >         netmask 255.255.255.192
> >         post-up /etc/network/freerunner start
> >         pre-down /etc/network/freerunner stop
> >
> > and /etc/network/freerunner:
> >  #!/bin/sh
> >  #
> >  # configures the freerunner for internet
> >  #
> >  #
> >
> >  DEVICE=usb0
> >  IPADDR=192.168.0.200
> >  REMOTE_IPADDR=192.168.0.202
> >  NETMASK=255.255.255.0
> >
> >  # get first ip for dns
> >  DNSIP=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' |
> head
> > -n 1 )
> >
> >  case "$1" in
> >   start)
> >         iptables -A POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR
> >         iptables -A PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR
>
> > --dport domain -j DNAT --to-destination $DNSIP
> >         iptables -A PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d $IPADDR
>
> > --dport domain -j DNAT --to-destination $DNSIP
> >
> >         if [ "$(cat /proc/sys/net/ipv4/ip_forward)" = "0" ]; then
> >                 echo "temoprarely allow ip_forward for openmoko" >
> > /var/run/openmoko.ip_forward
> >                 echo 1 > /proc/sys/net/ipv4/ip_forward
> >         fi
> >         ;;
> >   stop)
> >         iptables -D POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR
> >         iptables -D PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR
>
> > --dport domain -j DNAT --to-destination $DNSIP
> >         iptables -D PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d
>  $IPADDR
> > --dport domain -j DNAT --to-destination $DNSIP
> >
> >         if [ -f /var/run/openmoko.ip_forward ]; then
> >                 rm /var/run/openmoko.ip_forward
> >                 echo 0 > /proc/sys/net/ipv4/ip_forward
> >         fi
> >         ;;
> >  esac
> >
> > Made executable with "chmod +x /etc/network/freerunner".
> >
> > Also edited the ubuntu bug thing:
> > "One can patch /etc/udev/rules.d/85-ifupdown.rules. Moving the
> DRIVERS=="*?"
> > out of the top GOTO, to ACTION=="add" line fixes the problem."
> >
> > Well there we go, I'm out of ideas and I've tried these steps more than
> > once. I've rebooted and stuff and now I'm hoping for your help!
> >
> > Regards, bum
>
>
> _______________________________________________
> support mailing list
> support at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1306232&i=0>
> https://lists.openmoko.org/mailman/listinfo/support
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/Trying-to-make-DNS-work-tp1306198p1306232.html
> To unsubscribe from Trying to make DNS work, click here< (link removed) =>.
>
>
>

-- 
View this message in context: http://n2.nabble.com/Trying-to-make-DNS-work-tp1306198p1306250.html
Sent from the Openmoko Support mailing list archive at Nabble.com.




More information about the support mailing list