>> Could you describe a bit more what this is trying to do (which
>> problem it's trying to solve)?  I've looked at the file but still
>> can't figure it out.

> All the networking I do on the Freerunner goes through USB, via a more
> standard computer (desktop or laptop) that happens to have a
> conventional IP connection (ethernet or wireless).  To share the
> connection, you need:

So, IIUC, the script you sent is installed/run on the PC not on the FR?

> - an IP link between the Freerunner and the computer (static
>   192.168.0.200 and .202 addresses on usb0, in
>   /etc/network/interfaces);
> - NATing/masquerading and forwarding so that the computer forwards
>   packets back and forth;

I get the above two on my Debian PC with the chunk below in
/etc/network/interfaces:

# The Neo FreeRunner appears as a USB network adapter.
allow-hotplug usb0
iface usb0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 &
        up echo 1 > /proc/sys/net/ipv4/ip_forward &
        up iptables -P FORWARD ACCEPT &
        #post-up ssh neo resolvconf -a usb0 </etc/resolv.conf &
        down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 &

> - a DNS server accessible from the Freerunner; either you set it up by
>   hand in the Freerunner's /etc/resolv.conf, and update it by hand
>   when you're plugged into a different location (say, your laptop on
>   the road), or you tell the Freerunner to use the computer as a DNS
>   server, and the computer forwards the requests.  The latter can be
>   done by setting up a forwarding DNS server on the computer, or by
>   simply doing IP forwarding to the first server mentioned in its
>   resolv.conf.  Which is what the script does.  So I can plug the
>   Freerunner into my laptop wherever that is, and the DNS traffic will
>   be forwarded to the DNS server the laptop got from DHCP, without any
>   manual intervention on the Freerunner.

So the DNAT bits of your script can be replaced by the installation of
the dnsmasq package, right?

So your Neo is setup with "server 192.168.0.200" in /etc/resolv.conf?
How do you do that (purely statically by hand, or via resolvconf?)?
As you can see in the above "interfaces" snippet, I used yet another
trick at some point (copy the resolv.conf file from the PC to the Neo
via ssh).


        Stefan


_______________________________________________
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland

Reply via email to