Puppy 4.31 as wireless gateway

Under development: PCMCIA, wireless, etc.
Message
Author
sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

Puppy 4.31 as wireless gateway

#1 Post by sindi »

How do I set up Puppy 4.31 on a laptop with pcmcia wireless card
to connect with my neighbor's wireless signal and then transmit
it via wired ethernet to a hub? We want to share the signal since
we keep different hours anyway and AT&T keeps raising the price.
I have done this in basiclinux (which would work in much less
RAM - under 10MB console mode), but basiclinux (circa 2001)
does not have drivers for the cardbus wireless cards and I
need cardbus or USB for WPA support (and greater range).
I have a nice 200MHz laptop (with erratic LCD screen) and
enough memory for Puppy, and two others that will take 96MB
to run Pulp, (one of which only boots from floppy drive the
other with keyboard problems but this is all irrelevant for
a bridge). The neighbor is diagonally across the street and
I can put the laptop in the front window of an empty apartment
next door then run an ethernet cable to my apartment.

In basiclinux

ifconfig eth0 192.168.1.1 on gateway (with wireless card)
ifconfig eth0 192.168.1.2 on client (plugged into hub)
route add default gw 192.168.1.1 on client
echo "1" > /proc/sys/net/ip_forward

This sets things up for the gateway to forward to the client.

Is there a simpler way to do this with puppy linux?

This would save the cost of a bridge and make use of
an otherwise not very useful laptop.

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

Puppy as wireless gateway

#2 Post by sindi »

There are other postings about this.
I got it working fine with Basiclinux as gateway
and Puppy as client. Edit /proc/sys/net/ipv4/ip_forward to read 1 instead of 0 on the gateway.
My method uses ipchains as firewall but puppy does not have ipchains.
My neighbor can probably set his
router to connect only to his and
my IP numbers and MAC addresses for
added security instead.

This HP N5415 onboard wired ethernet
works with Basiclinux not Puppy linux - why?
Dead PCMCIA so I cannot use it as gateway except
with USB wired and wireless cards
(and a USB hub - they are too close)

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#3 Post by tempestuous »

sindi wrote:My method uses ipchains as firewall but puppy does not have ipchains.
That's because ipchains is long outdated. It's been replaced by iptables ...
but ipchains/iptables configuration can get quite complex, as your Puppy starts to act like a router.
I think it would be far more easy just to pass network traffic through Puppy with "bridge-utils" -
http://www.murga-linux.com/puppy/viewto ... 634#526634

gcmartin

#4 Post by gcmartin »

Got an idea. What type of ATT router is your neighbor using. What type of ATT router did you have before you got rid of them? Maybe a way to utilize thiem to accomplish your objective wihout have to use the electricity to run your laptops. Might save a little more money.

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

Puppy as bridge

#5 Post by sindi »

We had this working with a real 'bridge' until Comcast changed the neighbors from WEP to WPA, which the bridge is too old to handle.

A friend then set up a recent linksys router as a bridge (open-wrt or dd-wrt - one of them would not do WPA) but that seems to have failed.

The link to the discussion of bridge-utils seems to be for picking up a wired signal and converting to wireless and I want to do the opposite. The neighbors' router is wireless-only and so weak it can only be picked up at about 20% strength with a computer on the windowsill. I am using an EEEPC netbook (Asus 910) there because it fits, with monitor and keyboard on a nearby table. It was given to me with Arch linux and I don't want to mess that up by trying to install puppy, but I can put a different old laptop (one that supports cardbus so as to use a card that supports WPA) in the neighbor's house on the floor next to their wireless router.

Should I still be looking into bridge-utils or learning iptables? I only need to forward the signal to one IP address but would prefer to forward it to a hub or switch with a range of addresses. So I don't think I need to make puppy into a router or to run dhcpd.

I offered to buy the neighbors another Apple router with wired ports but they don't want to change even though their router slows their signal.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#6 Post by mikeb »

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Is what i use(d) ...only parameter to alter is wlan0 to whatever the wifi/internet is.

mike

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

iptables

#7 Post by sindi »

Do I run the two commands on the computer to be used as gateway, after giving it
an IP number in the neighbor's LAN?

I don't follow what to change 'wlan' to. I have not used iptables, and i only used ipchains by folllowing instructions, without understanding why it worked.

Neighbor's router assign IP numbers 10.0.1.x

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#8 Post by mikeb »

yes and wlan0 would be whatever device handles the internet side... ra0, wlan0, eth0 and so on...the device you connect the internet to in the wizard basically.

When i used this I added the 2 lines to /etc/rc.d/rc.local.

In my case I had static addresses as I had 2 ethernet cards as one connected to the modem but that may not be essential.

mike

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#9 Post by Ted Dog »

You may wish to.try an different microlinux live cd that sets up a instant mesh net so you do not have so many hoops on both ends. Comcast is famous for snoops and blocks that even if you got everything talking it will not pass internet traffic.

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

best small linux for use as wireless gateway or bridge

#10 Post by sindi »

What do you suggest using instead of puppy to convert the neighbor's WPA2-encrypted wireless signal to a wireless signal to pass to my switch?

Any hardware that accepts cardbus pcmcia (about 233MHz or newer) should work. My non-cardbus cards do not do WPA only WEP. I have a 266MHz with 64MB RAM which might be enough to run puppy command-line (no X).

The neighbor's router IP address is 10.0.1.1 so I think I can used a fixed address on my linux computer (10.0.1.115 for instance). I would feed the signal to my own router, giving it a fixed WAN IP address.

I should be able to figure this out with puppy and iptables. I had it working with ipchains in a linux that does not support cardbus and now I need WPA.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#11 Post by mikeb »

I never used the word iptables except when I did.

Is sharing the neighbours internet like wife sharing?

mike

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

Puppy as bridge (or gateway?)

#12 Post by sindi »

Using pulp linux (4.1.2-based) on a 233MHz Thinkpad 560x.
I used network wizard to connect to a wireless router (192.0.2.1).
Then typed the two lines (iptables and echo).

ifconfig shows eth1 is my wireless adaptor (not wlan0).

I have an XP computer (also connected to the same wifi signal) with internal wifi (which I spent all day putting in, under keyboard - XP would not tell me what the chip was so I ended up testing all my cards in another computer in linux). I tried setting up a Network Bridge, which may have worked but I have no idea what to do in order to get online with the linux computer (minus the wireless card in it). I tried assigning IP addresses 192.0.2.x to the linux computer.

So I plugged a wifi card into the linux computer and again don't know what to do next. How do I tell if XP is connected directly to the router or via the bridge? (Without removing the card I put inside it). At one point it stopped being online until I did a network 'repair'.

I had planned to dual-boot the XP computer with puppy but since it only boots from hard drive (or network, or proprietary external floppy or CD drivers) I would need to partition and format in another computer. DELL C400. It picks up 6 wifi signals (antennas in screen) as opposed to two by the Lucent orinoco pcmcia card in the linux computer.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#13 Post by mikeb »

ok if I follow this the linux machine will be on a different static subnet but in its config you use 192.0.2.1 the internet router as the gateway... if forwarding is working it should have transparent access so you would setup as if the internet device was directly connected.
. nameservers... either the same but I seem to recall using a mask setting... I am definately rusty on this if it seems vague.

I will double check on it later..

mike

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

ipchains specifies IP range - should iptables?

#14 Post by sindi »

Using IP chains (2.4 kernel)

Computer to be used as bridge (gateway?)
Wired and wireless cards

:
ipchains -P forward DENY
ipchains -A forward -s 192.168.1.0/24 -J MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward (ip-forward? sloppy writing)

ifconfig eth0 192.168.2.1
ifconfig eth1 - whatever gets it on the wireless network, or use dhcp
(for my neighbors 10.0.1.10 works, for my experimental setup 192.0.2.2)

Computer which receives wired signal
ifconfig eth0 192.168.2.2
route add default gw 192.168.2.1

The DNS server is 10.0.1.1 Apple router (or in the experimental setup 192.168.0.1 which is the AT&T modem, or 8.8.8.8 google also works).

The iptables commands suggested by mike don't specify which IP address to forward to - is something missing? Do I set IP numbers manually?

In the situation I am working towards, the wired signal will be going to a router, with WAN IP manually set in the same range as the IP of eth0 (wired) on the bridge (gateway?) Then it gives out IP numbers by DHCP in the range 192.168.3.1 (that part is set already) to the computers I will be using in the house. The bridge computer will be on a windowsill - it has a good enough antenna to pick up the 20% strength signal indoors. (My droid phone can't even pick it up next to the neighbors' house).

(ATA device) Comcast
computers == switch---VOIP router---- bridge~~~~wifi router~~modem
192.168.3.x 192.168.3.1 192.168.2.1 10.0.1.1 ........
/ 192.168.2.2 /10.0.1.10 /.......
phone line

We make free phone calls using callcentric, ipkalls for DID number, and google voice, currently with zoiper softphone on the one working netbook-in-window.


Mike's suggested commands for iptables

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

ipchains instead of ip tables

#15 Post by sindi »

While researching why my aironet PC4800 (airo_cs) pcmcia card (pulled from a PCI card, has a nice antenna) is not recognized by puppy 4, I found that someone got it working with Puppy 1, which has cardctl and a 2.4 kernel. Does Puppy 2 also have 2.4 kernel, which can use ipchains? (Which I have from another linux for which I compiled a 2.4.31 kernel long ago). Puppy 1 from 2005 is newer the computers I have been using (1997-2003).

My Windows expert can't remember how to use a Network Bridge.

Is it possible to install Puppy to an NTFS drive by downloading the files (sfs vmlinuz initrd.gz) via internet to the drive and installing some Windows bootloader that will also boot frugal puppy? The C400 boots from hard drive, proprietary floppy or CD drive (which I do not have), or network (onboard ethernet or possibly wireless card). Nothing USB.
I have not used grub and only know how to install lilo from linux.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#16 Post by tempestuous »

sindi wrote:my aironet PC4800 (airo_cs) pcmcia card ...
is not recognized by puppy 4, I found that someone got it working with Puppy 1
Puppy 4.x definitely contains the airo_cs driver, and should work fine with your PCMCIA card -
I suspect you just need to reset the PCMCIA interface. See the updated part of this post with the heading "EDIT: July 2008" -
http://www.murga-linux.com/puppy/viewto ... 1707#31707

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

aironet fix; puppy 1.07

#17 Post by sindi »

Thanks for the link to getting aironet working. I did try insert airo_cs but the card was not found. I will try 'eject' and insert. The same fix may work for an equally old oronoco card (this one pulled from a d-link router) found by an older linux but not by puppy. Both cards have large external antennas which should pick up weak signals better.

Where can I find Puppy 1.07, with kernel 2.4.29 (for use with ipchains) and OSS sound (easier to use with Crystal 4236 sound chips in my 1997-98 Thinkpads, and for a 300Mhz Winbook where OSS sound works and ALSA does not). Older laptops make nice internet radios and often even have volume knobs.

The link for isos of puppy 1, to puppy-foundation.com, is broken (domain for sale). The official site offers 2.16 and 2.17.

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

pccardctl fix did not work for aironet or orinoco cards

#18 Post by sindi »

aironet PC4800 - identified by cardctl in an older linux (but pcmcia utility did not load the module so the card is not usable); puppy network wizard cannot find it; pccardctl status 'no card', ident 'no info', eject, insert, same results.

orinoco card - cardctl and pccardctl identify it 0xd601 x0500; Older linux loads the module and the card works. Puppy's network wizard can't find it and when I manually load it no new interface is found. eject/insert no help.

A regular pcmcia orinoco-based card (pulled out of an Apple router) works as expected in Puppy (found automatically, goes online).

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#19 Post by tempestuous »

sindi wrote:orinoco card - cardctl and pccardctl identify it 0xd601 0x0500
That's quite an obscure device ID. Puppy won't recognise that.

sindi wrote:aironet PC4800 ...
pccardctl status 'no card', ident 'no info', eject, insert, same results.
I have a suspicion this may be a bios issue - have a look in bios and see if there are any settings relating to "PCMCIA" or "Cardbus". These settings may not be obvious or even intuitive - you may see something like "Auto". Change the bios setting, and see if that helps.
Also look for a bios setting "PnP OS = YES/NO" - make sure it's set to "NO".

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

aironet, orinoco, and ipchains

#20 Post by sindi »

First, the old pcmcia cards

1) aironet card - probably dead. XP recognized it and had the drivers but, assuming they loaded, could not find any networks. Basiclinux (circa 2000) identifed card but would not load driver. Puppy may have been the most intelligent, refusing to even recognize it.

2) orinoco card . Works perfectly in basiclinux. Recognized by XP, a bit complicated to load drivers (control panel insisted I was already doing what I tried to do) but a friend tested it working. Puppy identifies but won't bring up new interface on two unrelated computers and this computer has no way to turn off pnp. I could try booting pnpbios=off. Don't know why a WAVELAN Silver orinoco works fine in all OSes (XP even has and automatically loads the driver, same driver).

The 0d601 0x0500 chip is mentioned in lots of posts by people who could not get it to work. All I needed was to add it to the (very old) pcmcia config file as taking orinoco_cs and hermes modules. (Or use a standard config file where it was already concluded)Works with kernel 2.4.

This is all irrelevant since orinico does WEP not WPA2 which is what I need to use the neighbors' signal. Only cardbus cards do WPA2 and the author of basiclinux refused to support cardbus since his laptops were not new enough to accept such cards.

Back to puppy with a cardbus-WPA2 card (2005). I found at puppylinux.ca/vintage all the puppies from 0.4 to 4.3.2 (official) and downloaded 1.07 and 1.04-barebones (60MB) to try with ipchains and OSS sound. Also Turbopup Extreme (runs in 10MB RAM full installation) in case I figure out iptables. But since my slowest (866MHz) laptop with internal wireless (picks up weak signals) has 512MB RAM, I can waste memory.

Is there some bootloader that can be installed from XP to boot puppy frugally? Full installation would require shrinking XP to make a linux partition - with frugal puppy?
I could put the hard in another computer to shrink NTFS and make fat32 and ext2 partitions. (I like booting with loadlin from fat32).

Post Reply