working SIM install, network problems - update

Rodney Myers rdmyers at mtpalomar.net
Sun Dec 7 05:00:36 CET 2008


On Dec 4, 2008, at 3:57 AM, clare johnstone wrote:

> At this stage I can  do
> ssh root at 192.168.0.202
>
> Normally it will argue and I have to edit the file ~/.ssh/known hosts
> by removing the line it is objecting to. It will then agree to the  
> ssh.
> Most people automate that process to avoid the editing etc but that
> is a matter of taste only. Once you have things going without trouble
> you can automate a lot of things.
>
> good luck,
> clare

  Thank you for your scripts. I "think" I edited them to correlate  
tthem to my network;

192.168.1.0/24

I now can ssh into the OM, and set the time to my local "America/ 
Los_Angeles". One step ahead.

I can ping the debian machine, and everything on my lan, but nothing  
outside the lan.

the debian machine ifconfig;

usb0      Link encap:Ethernet  HWaddr AA:3D:4C:60:CA:C9
           inet addr:192.168.0.200  Bcast:192.168.0.255  Mask: 
255.255.255.0
           inet6 addr: fe80::a83d:4cff:fe60:cac9/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:672 errors:0 dropped:0 overruns:0 frame:0
           TX packets:1116 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:93013 (90.8 KiB)  TX bytes:120305 (117.4 KiB)


the OM ifconfig;

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:11 errors:0 dropped:0 overruns:0 frame:0
           TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:1033 (1.0 KiB)  TX bytes:1033 (1.0 KiB)

usb0      Link encap:Ethernet  HWaddr ae:f6:a0:3f:a1:27
           inet addr:192.168.0.202  Bcast:192.168.0.255  Mask: 
255.255.255.0
           inet6 addr: fe80::acf6:a0ff:fe3f:a127/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1134 errors:0 dropped:0 overruns:0 frame:0
           TX packets:681 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:106049 (103.5 KiB)  TX bytes:103447 (101.0 KiB)

the OM output of "netstat -er"

netstat -er
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref     
Use Iface
192.168.0.0     *               255.255.255.0   U     0      0         
0 usb0
default         one             0.0.0.0         UG    0      0         
0 usb0


My interpretation of ths scripts;

cat bin/OM-config
#!/bin/sh
/sbin/ifconfig usb0 192.168.0.200 netmask 255.255.255.0
/sbin/route add -host 192.168.0.202/32 dev usb0

rodney at riverside:~$ cat bin/om-network
#!/bin/sh
/bin/echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -A INPUT -s 192.168.0.202 -i usb0  -d 192.168.0.200   -j ACCEPT
iptables -A INPUT  -s 192.168.0.200  -i eth+  -d 192.168.0.202  -j  
ACCEPT
iptables -A INPUT  -s 192.168.1.0/24  -i eth+  -d 192.168.0.202  -j  
ACCEPT
iptables -A INPUT  -s 192.168.1.0/24  -i eth+  -d 192.168.2.0/24  -j  
ACCEPT

iptables -A FORWARD -s 192.168.0.202 -i usb0 -d 192.168.2.0/24 -o eth+  
-j ACCEPT
iptables -A FORWARD -s 192.168.1.0/24 -i eth+ -d 192.168.0.202 -o usb0  
-j ACCEPT

iptables -A OUTPUT -d 192.168.1.0/24 -o eth+   -j ACCEPT
iptables -A OUTPUT -d 192.168.0.202 -o usb0  -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.openmoko.org/pipermail/community/attachments/20081206/5c30252e/attachment.pgp 


More information about the community mailing list