Author Topic: Getting Internet Working For The Z Across Usb  (Read 4099 times)

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Getting Internet Working For The Z Across Usb
« on: November 03, 2005, 09:44:31 pm »
I'm using OZ 3.5.4RC, and I want to be able to acess the internet(downloading packages and so forth). Is there a simple way to do this? I've never done any IPTables, or NAT, and my laptop is connected via a wireless router. Suggestions?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Getting Internet Working For The Z Across Usb
« Reply #1 on: November 04, 2005, 05:02:07 am »
Quote
I'm using OZ 3.5.4RC, and I want to be able to acess the internet(downloading packages and so forth). Is there a simple way to do this? I've never done any IPTables, or NAT, and my laptop is connected via a wireless router. Suggestions?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102183\"][{POST_SNAPBACK}][/a][/div]
Under linux, use webmin and shorewall. All you have to do is make sure you have the correct modules loaded on your laptop and the only thing you have to setup is masquerade. Turn everything else off.
SL-3100, pdaXrom

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Getting Internet Working For The Z Across Usb
« Reply #2 on: November 04, 2005, 09:37:47 am »
that's on my laptop right? not on the Z? I'll look into shorewall. Why don't I want anything else on? Isn't shorewall a firewall?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Getting Internet Working For The Z Across Usb
« Reply #3 on: November 04, 2005, 04:27:30 pm »
Quote
that's on my laptop right? not on the Z? I'll look into shorewall. Why don't I want anything else on? Isn't shorewall a firewall?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102251\"][{POST_SNAPBACK}][/a][/div]
You use a firewall on your laptop to give you masquerading. 'Masquerading' is the process of 'moving' traffic from USB to your ethernet connection. What I meant by not turning anything else on is that you just leave all the firewall settings open and let all connections talk freely amonst each other, because I am assuming you have your router setup to close all unneeded ports.
On your laptop you have to have the right modules loaded to allow masquerading, and you also have to be able to load the module 'usbnet'.
On your Zaurus, you have to setup "Lan & Wifi" and USB under 'System Tools', and manually edit your resolv.conf file.
SL-3100, pdaXrom

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Getting Internet Working For The Z Across Usb
« Reply #4 on: November 05, 2005, 09:50:02 pm »
I've got shorewall(and webmin-shorewall) setup, now what? can you walk me through step by step?
« Last Edit: November 05, 2005, 09:58:12 pm by microsoft/linux »
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

Sheila

  • Newbie
  • *
  • Posts: 37
    • View Profile
Getting Internet Working For The Z Across Usb
« Reply #5 on: November 07, 2005, 08:36:57 pm »
Quote
I've got shorewall(and webmin-shorewall) setup, now what? can you walk me through step by step?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102497\"][{POST_SNAPBACK}][/a][/div]
There are websites that are far more qualified than me i helping you do this. First, make sure you have all the right modules loaded for masquerading on your linux laptop, then the only part of shorewall you have to set-up is masquerading.
I've attached my complete /etc/shorewall directory from my gentoo linux set-up. Maybe try replacing yours with this one, or looking thru it for clues. Sorry, work is real busy this week...
SL-3100, pdaXrom

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Getting Internet Working For The Z Across Usb
« Reply #6 on: November 07, 2005, 11:40:40 pm »
I'm sorry, I'm a complete newbie at this. I'll try reinstalling shorewall(removed it in frustration) and using your /etc/shorewall. Thanks.
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Getting Internet Working For The Z Across Usb
« Reply #7 on: November 07, 2005, 11:57:20 pm »
used your setup, used wlan0 and usb0. I tried 'shorewall start' and got the error
Code: [Select]
Activating Rules...
   Error: No policy defined for zone fw to zone net
Suggestions?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Getting Internet Working For The Z Across Usb
« Reply #8 on: November 09, 2005, 01:32:46 pm »
Quote
used your setup, used wlan0 and usb0. I tried 'shorewall start' and got the error
Code: [Select]
Activating Rules...
   Error: No policy defined for zone fw to zone net
Suggestions?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102786\"][{POST_SNAPBACK}][/a][/div]

you should just be able to type:
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

where eth0 is the external interface on your firewall.

don't forget to enable ip forwarding:
     echo 1 > /proc/sys/net/ipv4/ip_forward


you can also do this when your Z is connected to the gateway over bluetooth or wireless.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.