Thursday, August 25, 2005

Well, I finally got around to building the ipcop machine.

(and I didn't start this blog with "I'm trying" either! :-)

It wasn't too difficult, but there were a couple of things that were a bit counter intuitive.

I backed up a few files off the machine I was planning to use as my IPCop box, an old PII 350, and then I grabbed it out from under the desk.

I moved the disk from the tivo disk imaging machine into the new machine, and installed all the extra network cards in it, and swapped the 64MB RAM stick with the 256MB stick I pinched out of the card server the other day.

The Intel NIC already in it is a different revision to the other 2, but that doesn't matter, and I put in a Realtek card, since I couldn't get the other Intel NIC out of the other server.

I booted up the machine, IPCop booted off the disk no worries, I reran the setup, adding all the extra NICs in.

I connected my existing LAN to the Green interface, and attempted to access the web interface to do more configuration, but I couldn't manage to connect.

I logged into the IPCop box, and attempted to telnet to the local machine, to test if the port wass open, but discovered that there's no telnet client on IPCop.

Not being able to test if the port was open, and assuming it was, I figured it was because I'd set the IP on the Green interface the same as on my old router, and the arp table had stable entries in it.

I couldn't plug my laptop directly into the Green interface, and keep the LAN out of it, because I couldn't find a crossover cable.

I put a WRT54G in between, to act as a switch, to make up for not having a crossover cable, but I still couldn't connect to the web interface.

I figured that because the WRT was connected to the other WRT with WDS, that the stale arp entries were still causing my traffic to go to the old router (a 486 running LRP, with no web interface).

I then powered off the other WRT, wired to the LAN, thinking I now had isolated my connection between my laptop and the IPCop box.

I still couldn't connect. Hmm. I even tried rebooting the IPCop box.

It was at this point I remembered that ipcop runs the web interface on port 81, not 80.

As soon as I tried to connect, I was redirected to https, and was able to login.

I went about configuring everything, moved the adsl modem over, connected to the red interface.

I ran the machine like that for a while. It was all running nicely, IPCop seems pretty good.

I backed up the config to floppy disk, testing that functionality.

I had a 40gb disk in the machine at the time, which I thought was a bit excessive, I'd rather have something like a 10G disk in there.

The original disks I'd taken out of the machine, were a 10G and 13G.

I connected the 10Gb disk to the internals of the USB external drive caddy thing, and attached it to my laptop. I found a stack of partitions on this disk, along with a bunch of crud.

I quickly browsed through, looking to see if I could use the disk again, it looked like I didn't need much of what was on there.

I found a few bin/cue files, backups of PlayStation discs. I thought about deleting them, then wondered about a PSX emulator for Xbox. I googled around, but couldn't find one. I'll have to look harder.

As I kept looking through the disk partitions, I eventually discovered that it was actually the system disk out of the machine, and while I'd backed up the important stuff, I wasn't quite ready to blow the disk away yet.

I unmounted all the partitions, and took the disk off.

I grabbed the other disk, the 13Gb disk. I noticed that it was set to slave, and I had a quick look, couldn't find a jumper to put on the drive, figured the USB adapter wouldn't care anyway, so I just connected it.

My laptop tried to mount it, but when it found that it was a slave drive (presumably), the kernel USB drivers crapped themselves.

I removed the drive, reattached it, and it didn't do anything. I pinched a jumper off a different drive, set the drive to master, and reattached, but it still didn't do anything.

I decided to try unloading/reloading the usb drivers, but I couldn't unload them.

I rebooted my laptop, and when it came back up, it happily mounted the disk.

Oh well, no more slave drives attached via USB.

I found this disk to only have 1 partition on it, and be full of DivX 3.11 DVD backups. I started moving them all on to my laptop drive.

This was going to take about 1/2 hour, so while I waited for that, I realised that I needed some patch cables, and I'd run out, they were all used, or at least all run, behind the desk.

I started pulling the whole LAN patching job out, to do it all again, since now there were a couple of machines I didn't need anymore.

While doing this, I must have bumped the card server or something, because Dad came in, and said the satellite tv had stopped.

I mucked around with that for a couple of minutes, I initially thought it might have been cause by me unpatching the network card, perhaps it needed a link up, but repatching it didn't work.

I then found the machine had locked up, I rebooted it, started the stuff back up, but it still didn't work. I wondered if I'd accidently bumped the serial port card or something.

I rebooted the machine again, and this time it started working again.

I also had to find power, because when I installed the IPCop box, I wanted to move a switch, hub (to convert 10baseT to 10base2), adsl modem, WRT54G all in with it.

I realised that all 4 of these have those stupid plug pack adapters, so I'd need 2 powerboards, because you can only fit 2 of those adapters in each 4 way board.

I moved some stuff off to be powered by the rack, because it's got 6 points in it.

This allowed me to free up most of one powerboard, it was only running another powerboard, which was running the card server, and the power adapter that runs the phoenix programmer.

Argh, I had to shut it all down again, to move it to another powerboard.

I traced a few more cords, unplugged some monitors I don't need, then shut the card server down, moved the power cord/adapter, booted it back up, and got it running.

I now had a pretty large pile of cat5 patch cables, power cords, and power boards.

It had taken a little bit over 1/2 hour by now, so all the files were moved off the disk I wanted to use.

I deleted the partition off the disk, and disconnected it. I shut the IPCop box down, removed the 40gb disk, and attached the 13Gb disk.

I needed to reinstall IPCop obviously, so I found the CD, and put it in the drive, and configured the BIOS to boot off the CD.

I tried this a few times, but it wouldn't boot. I suspected because the CD drive is a piece of crap, and won't read most CDs, letalone when it's on its side.

I tipped the machine back up, and now it was able to boot off the CD. I got about halfway through the install, and then tar failed, because the CD drive couldn't read the CD properly, and I was forced to reboot.

I tried again, it did exactly the same thing. Crap. I grabbed a spare old CD writing drive I've got hanging around, and attached that out the side of the machine.

I booted up, ran the install for the 3rd time, and this time it was fine. It got to asking me about restoring a floppy backup, the disk was still in the drive, so I told it to.

It sat there for a minute, and then said it failed. Hmm, I hadn't even seen the drive light go on.

I checked, and realised that the floppy drive power had been disconnected, between switching the hard drives, and standing the machine upright.

I didn't want to start the install all over again, and the power connector for the floppy drive wouldn't reach, since it was the one that came off the connector in the hard drive.

I carefully disconnected the power from the hard drive, attached a different power connector, and then carefully attached the power connector back to the floppy drive.

I told it to restore the config from the floppy again, and all was happy. It read all the files off the floppy, dumped them on the hard disk.

I don't think I had to do anything after that, but reboot the machine.

When it rebooted, I powered it off, and grabbed the cdrom drive off the machine again. I didn't bother to connect the other crappy one again.

The machine booted up, and immediately the internet connection was working again, sweet.

I clicked around a bit, made sure everything was right, and then I got organised to put the machine back where it belongs.

I put the side back on it, found all the bits I needed to connect to it, found appropriate length patch leads, plugged all the plug packs in to the power boards, and moved the whole lot over to reinstall it back under the desk.

I pushed it in a bit, and grabbed the coax run off the old router, and attached it to the hub. I pushed the machine right back in.

I ran the phone line around the outside of the room, instead of across the middle, patched it.

I moved one of my WRT54Gs, and patched that in to the blue interface NIC in the machine.

I powered it all up. It sort of looked like it was working.

I couldn't do anything from the wireless connection, but I figured I had to add my MAC address in there or something, so I ran a length of cat5 into the laptop. I was able to access the web interface, and went through setting it all up.

I then tried to get a DHCP address on wireless, but it just wouldn't work. I was scratching my head about that for a while.

I couldn't access the internet either, and then realised there was no ethernet link on the adsl modem. I reached around behind, and found it wasn't pushed into the red NIC properly.

I went back to trying to get the wireless working. I was running tcpdump on eth2, seeing the dhcp request, but it just wasn't replying to it.

It took me quite a while, and I realised that I was looking at the wrong interface, eth2.. that's the Orange NIC, why is there DHCP requests on there??

I climbed under the desk, and discovered I'd somehow managed to patch the WRT54G into the Orange NIC, not the Blue NIC.

I moved that, and immediately I got an IP. That only wasted about 45 minutes, of clicking around, silly config checking, head scratching.

I setup some port forwarding, for LimeWire and aMule, but they still claimed they found a firewall.

It took me a minute to work that out too, oh yeah.. first, I still had a wired connection, and I'd set the port forwards to my wireless interface, and then I realised that the adsl modem is on a different subnet, and still has port forwards in it, to a now wrong IP.

I changed those forwards in the modem, and changed my laptop's default route, to go via wireless.

Now I couldn't get anything. I'd see the traffic coming in on the Blue interface on IPCop, but it would never allow any replies.

I couldn't even access the config interface from the Blue network, which I thought was strange.

I mucked around with this for a while, gave up, changed back to the wired/Green interface, which worked, changed the port forwards to the wired interface, and went to bed.

When I checked in the morning, I found the problem, while I'd entered my laptop's details in the Blue Access bit, somehow my entry had become disabled, I just enabled it, and bang, it was all working.

I then tested DHCP on Blue (which had been failing last night), but it still didn't work. It wasn't until I disabled DHCP on Blue, and reenabled it that it started working.

I changed the port forwards again, and tested it, working, fine.

Now I wanted to get the ADSL modem running in bridge mode. I googled around a bit, and found a forum, linking to this page, which contains a video "Enabling Bridge Mode".

I watched that (happily worked in mplayer, even though it's a windows mediocre video v9 file). Didn't look too hard, set encapsulation type to "1483 Bridged LLC", then set bridge to enabled.

I did that, and rebooted it. Now I had to configure IPCop to deal with doing the authentication.

I knew I had to run the setup again, to change the Red interface settings, so I tried doing that, while ssh'd in over the wireless. Oops. You can't do that, because it pulls the Blue interface down.

I went and logged in locally, and reconfigured it, setting it to use PPPoE for the config of the Red interface.

This looked like it came up, but then I had to work out where to put the settings of the account. More random clicking around in the web interface, and I found it under the dialup settings.

I setup my details, and attempted to connect, it didn't seem to work. I tried rebooting, in desperation, but it still didn't connect.

I tried using the PPPoE standard connection, instead of the plugin, but that didn't work either. While clicking around, I noticed that Blue Access, and some other options had disappeared.

I reconfigured IPCop again, and tried setting the Red interface to DHCP instead of PPPoE.

This didn't work either. When I went back and checked the card bindings, I found it had lost all the bindings, except for Green. I reassigned the cards, and this time it worked.

I switched back to using the PPPoE plugin (had to stop the connection first), and then it was all fine.

So far I've haven't seen any other issues. I'm pretty impressed so far.

(Oh, and I still haven't finished repatching the network, I just did the bare minimum, and then got sick of crawling around under the desk, because I already had to change the torch battery once).


Post a comment

<< Home