Sunday 21 March 2010

Ventris' Thidranki Battledruid

Ha! I came across my old Dark Age of Camelot Thidranki Battledruid guide and the video of my shenanigans. It's quite appropriate for the Uthgard Freeshard now, although they badly need a level 24 BG!

If you're bored and you even know what DAoC is then feel free to take a look.

Thursday 18 March 2010

Olive to Olive Communication

Getting Juniper Olives to chat to each other is quite easy, if you’re building your virtual Olive network as a lab for seeing protocols in action then you can set up your virtual interfaces with no protocols exposed to Windows and you’ll have a clean connection.

Using Wireshark you can capture on the virtual interface and see the protocols sloshing about in their native form.

I’m assuming you have built yourself a couple (or more) of Olives as discussed here and here. A quick way of creating more than one olive is to duplicate the hard drive images, there’s a good tutorial here for that but basically:

  • Shutdown your Olive and power off the VM.
  • Clone your existing .vdi following the tutorial above.
  • Build a new VM and use the cloned .vdi as your HDD.
  • Boot and be so happy you nip down the pub for half hour.

Once done return to VirtualBox and select File->Properties then open the network item on the left.

You may already have a VirtualBox Host-Only Ethernet Adapter listed in which case you can skip this step. If you don’t or you want to connect more than one Olive together over different virtual LANs then use the icon on the right to add a new adaptor.

Now open Windows Control Panel and view your network adaptors, open the one you just created (or the one that was created for you) and de-select everything. Here’s what mine looks like:

imageReturn to VirtualBox and edit the properties of the first Olive you want to connect then select network and enable a new adaptor (if you used Adaptor 1 for installation and general IP connectivity to the host then it’ll be Adaptor 2) and configure as follows:

  • Attached To: Host-only Adapter.
  • Name: Select your newly created adaptor.
  • Advanced: Default (Should be Intel PRO/1000MT).

OK that and then select the second Olive you want to connect to the first and select the same Host-only Adaptor settings as the first. The only exception is the Mac Address which should be different.

Once done bring up both olives and you should have a second “em” interface to play with, configure an IP DMZ on both sides and retire to the pub for a second time safe in the knowledge of a job well done.

Because you cleared out all the Windows services attached to the network adaptor your packet captures should be totally free from extraneous fluff as follows:

image

Saturday 13 March 2010

Juniper Olive on Sun VirtualBox

In my previous post I told you how to prepare VirtualBox and FreeBSD to accept a Juniper Olive. Now we need to upload the JunOS software and install it.

In the good old days (JunOS 7.4) this was quite an easy task but since 8.4 things have got a bit more complicated, Juniper upgraded the version of FreeBSD and added a utility that verified the PICs meaning that the install would fail even if you tried to force it.

Disclaimers:
  • This isn’t supported, Juniper will die a little inside if you ring the JTAC up and demand to know why your Olive doesn’t work. Enough of this and they will stop olives working altogether so play nice.
  • I can’t supply JunOS to you, nor can I recommend anyone who can. If you don’t have access to it then you shouldn’t and you should go out for a nice pint or two instead.
  • I’m a network engineer and have a very basic knowledge of BSD, feel free to mock my tar/gzip/shell skills or better yet tell me an easier way.
Step-By-Step
I’m assuming that you’ve followed the previous post and are sitting at the root prompt of your FreeBSD VM.

First thing you need to do is get the jinstall tarball onto your VM, I have a FTP server running on my PC for this purpose but you may have one on the internet or a home server etc. If you don’t and you need a good FTP server I can recommend FileZilla just make sure that if you’re running Windows 7/10 and you enable the server exe in your firewall.

Creating the Olive Installer
Use the FTP CLI within FreeBSD to get the jinstall into your home directory. I’ve used jinstall64-14.2R8.4-domestic-signed.tgz as an example; make sure you substitute it for your version in the following:

>cd /var/tmp

>mkdir src
>mv jinstall64-14.2R8.4-domestic-signed.tgz src
>cd src
>tar –xzf jinstall64-14.2R8.4-domestic-signed.tgz
>mv jinstall64-14.2R8.4-domestic.tgz ..
>rm –r *


Because this is a signed version of JunOS you need to extract the non-signed version out of the tarball, once done we move the non-signed version (jinstall64-14.2R8.4-domestic.tgz) into the /var/tmp directory and delete all the rest of the files.

Now we need to move the file back into the /var/tmp/src directory and extract it:

>mv ../jinstall64-14.2R8.4-domestic.tgz .
>tar –xzf jinstall64-14.2R8.4-domestic.tgz
>rm jinstall64-14.2R8.4-domestic.tgz


In this directory you will now see all the detail of the package, the file we are immediately interested in is the pkgtools.tgz file. Create a new tmp folder and extract this file into it.

>mkdir tmp
>cd tmp
>tar –xzf ../pkgtools.tgz
>rm ../pkgtools.tgz


Now we need to replace the checkpic binary with something that will give a more positive response when called:

>cp /usr/bin/true bin/checkpic

This means that every time the installer runs this to check the validity of the PICs it will be told that everything is a-ok. Now we need to package this back up, remove our temporary files then repackage the whole thing up into our modified jinstaller.

>tar –czf ../pkgtools.tgz *
>cd ..
>rm –r tmp
>tar –czf ../jinstall-olive.tgz *
>cd ..
>rm –r src


This can be a bit hard to follow but basically at the start you were in the /var/tmp/src directory where the pkgtools were stored and have tar and zipped all the files up. I’m sure this whole page can be done in a single line of shell but I don’t have the slightest clue how.

If everything has gone to plan you should be left in the root home directory with a file called “jinstall-olive.tgz”. If you want you can copy this over to your ftp server so if you want to use it again you don’t have to follow the above process a second time.

Installing the software from here is quite easy:

>pkg_add –f jinstall-olive.tgz

It will throw up a load of warnings (too late you used the –f force switch) and tell you that you need to reload. Issue the “shutdown –r now” command and hope for the best.

If all goes will the VM will reboot, get to the boot loader then then appear to stop. This just means that output is redirected to COM1 port, new versions of JunOS (not 8.4) now enable login on the console screen so you don’t need to play about with the COM1 port (if you remember we enabled it but ignored it in the last post).

After about 5 minutes it will reboot again and then after a further few minutes you should end up with a login prompt. Login is root with no password and you should be dumped to the new Olive shell. Enter “cli” and you are now running your own Juniper Olive.




Have fun!

Preparing VirtualBox and FreeBSD for Juniper Olive


You can run JunOS software on a FreeBSD box with no major problems it’s called a Juniper Olive and it’s a great way of studying for your JNCIx exams, this post aims to improve on a the basic installation method you see elsewhere on the web.

Basic disclaimer I stole from Sid Smokes site:
A note about the JUNOS software: I will not send anyone Juniper software. Don't ask. If you don't know how to get it, then you're probably not supposed to have it anyway. You can download it from the Juniper site if you have an account. Don't bug Juniper JTAC about olives either. They are not supported.”

The improvements here are two fold, firstly this is a fresh install of JunOS 14.2R8.4 without having to install a previous version and upgrade from there. Secondly I like the idea of having a lab running on a single box so I prefer my Juniper Olives to be virtualised – I know it can be done with VMWare but the way it handles serial ports, HDD (SCSI instead of IDE) and so on means that VirtualBox is my VM platform of choice for a hassle free installation.

Previously this guide only supported JunOS 32bit version, but I've since tested with 64bit and it works just fine. I'll provide notes where needed for the version you want to use.

Requirements (Software versions I’ve used are in brackets).
  • Windows (Windows 10).
  • Oracle VirtualBox (Version 5.2.4 r119785)
  • FreeBSD 6.4 - Either:
  • JunOS jinstall package.
    • 32bit procedure tested on 8.4, 8.5, 9.4, 10.0 and 12.3
    • 64bit procedure tested on 14.2
VirtualBox Step-By-Step
First thing you want to do is install Oracle VirtualBox – the default install options will be just fine.

Once done create a new VM as follows:

Create VM
  • Select New VM
    • Name: “JunOS64” (Original yes?)
    • O/S: BSD
    • Version: FreeBSD 32bit or 64bit.
  • Memory: 2048Mb (You can reduce this down depending on your version - but start with 2G)
  • Hard Disk - You’ll need to create a new hard disk using the wizard in this window. Create a dynamically expanding disk of about 50Gb.
  • Finish
You now need to edit the settings of the newly created VM, right click on the VM and select “settings”. Yes I know I’m teaching you to suck eggs.

Verify your settings are as follows:
  • System
    • Motherboard
      • Disable Floppy from Boot Order
      • Extended Features: IO APIC & EFI both disabled.
    • Processor
      • One CPU
      • Extended Features: PAE/NX enabled.
    • Acceleration
      • VT-x/AMD-V: Enabled - If you do not have the option then you may not be able to run JunOS in VirtualBox, some people report success but I've never been able to make it work. The only workaround is to install JunOS on another computer with virtualisation technology and move the VM over to this computer – I may tutorial this later but it’s a terrible pain in the arse.
      • Nested Paging: Enabled.
    • Display: Defaults
    • Storage
      • IDE Primary: Juniper Olive 1.vdi
      • IDE Secondary: FreeBSD CD ISO
      • Floppy: Empty.
    • Audio: Disabled.
    • Network:
      • Adaptor 1 – Enabled.
      • Attached to: Bridged Adaptor (You can also use NAT, this adaptor will enable you to share your internet connection so you can access your FTP server. If your PC is connected to a router for your DSL/Cable then select bridged. If your computer connects directly to the internet with a USB dongle or DSL/Cable card then select NAT).
      • Name: Whatever your current local network card is called.
    • Serial Ports
      • Port 1 Enabled
      • Port Number: COM1
      • Port Mode: Disconnected
    • USB: Disabled
    • Shared Folders: None.
That’s a bit of a long list of stuff and we’re not done yet but basically once you’re done your settings should look a little bit like this:



FreeBSD Install
Go ahead and fire up your VM, it should boot up and load the FreeBSD installer. Once you have chosen your language and keymap you will get to the main menu, you should select “Express - Quick installation (for experts)”.

When FDISK starts select “Use entire disk” (A key) then select the middle entry and make the disk bootable (S Key) then exit out (Q Key).

Let FreeBSD install the BootManager unless you have a pressing need to do otherwise.

You will now have to slice the disk as follows:
ad0s1a 1000M /
ad0s1b 500M swap
ad0s1d 10M /spacer
ad0s1e 500M /config
ad0a1f /var

The spacer partition ensures that /config and /var have the correct designation (ad0s1e and ad0s1f respectively) – if your designations look a bit different that’s not a big problem. If anyone knows how to specify the slice so there’s no need to have the spacer mount then let me know. Save those slices off and you’ll be taken back to the menu.

Select the Minimal Distribution then select your install media. If you have the full FreeBSD install on CD then you should use that – if you booted from a Net install CD then you need to specify an FTP site.

The URL for the site is as follows:
32bit - ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/
64bit - ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/

(That may change, you may need to hunt about for the correct location.)

During the FTP install you will be asked if you want to set up your network, do so and enter your network IP/Mask and gateway as requested.

For a CD install you may not get asked so select it from the menu so your network is up and running when FreeBSD starts.

Install FreeBSD – Once it’s complete, un-mount your CD and reboot into FreeBSD. Login as root with no password and you are good to go to the next stage documented here.