Categories
blog howto windows

Office 2010 command line activate or change product key

Cloned PC, changed office key. Got error with license information on restart office. Ativated through CMD and all was OK.
Open CMD as Administrator.
cd c:\Program Files (x86)\Microsoft Office\Office14
cscript ospp.vbs /act

If you want to change product key through command line it is like this:
cscript ospp.vbs /inpkey:XXXXX-YYYYY....

Categories
server virtualization

Enable software iSCSI adaptor on ESXi v5

Through SSH or on local console:
esxcli iscsi software set --enabled=true

Categories
blog server virtualization

HP ESXi 5.0 image license problem

The vmware.lic file is read only with a free ESXi key inside.

Execute on the command line of the particular ESX host:
esxcli software vib remove -n hp-esx-license --no-live-install
Connect with the VI client directly as root to the host and select by right-click to “shutdown” the host.

Categories
blog howto linux server

Ubuntu upgrade from 10.10 to 11.04 broke grub

After upgrading my Ubuntu server from 10.10 to 11.04 using the “do-release-upgrade” method, my system would no longer boot.
It was stuck on a GRUB shell. I downloaded the liveCD, booted from that and ran the excellent Boot-Repair utility. I had to install it using apt-get, so you need an internet connection. They should include it in the liveCD. I belive you can also download a Boot-Repair ISO file to boot from.

But the Boot-Repair tool worked great and fixed my GRUB in no time.
I see a lot of problems with GRUB after the upgrade. Maybe it’s a bug that affects people who, in the past, already upgraded from 9.x or 8.x to 10.x. So people who had GRUB v1 at some point in time.

Categories
blog howto

SIPTAPI and Cisco UC520

I have succesfully configured SIPTAPI by IPCOM for use with the Cisco UC520.

Follow the installation instructions and then configure like this.
SIP DOMAIN: IP for the UC520, this can either be the LAN IP or the CallManager IP.
SIP PROXY: leave this empty
user: leave this empty
password: leave this empty
extension: your extension number

If configured like this, whenever you dial from dialer.exe or outlook your own extension will ring, pick it up and the number you requested will be dialed.

Categories
blog howto linux

Send PCL code for landscape to raw printer in Linux

When the CUPS printer is in RAW mode (no driver or PPD file), you can send PCL codes to the printer in plain text. You can just insert & append the codes on your job.
Here is how I did it:

#!/bin/bash
#
# Created on 01 march 2011 by Stan Gobien
# http://ares.gobien.be:8080/2011/03/pcl-code-landscape-raw-linux/
#
# Insert PCL code for landscape at beginning and append PCL reset code at end
# PCL codes tested on HP Laserjet
# The script expects input via stdin and sends output to stdout
# usage: cat somefile | ./landscape.sh | lp -dPRINTER
cat | sed -e ‘1i^[&l1O’ | sed -e ‘$a^[E’

Note: You can’t simply copy/paste the ^[ code. This is the VI representation of the ESCAPE character. You have to create it like this: CTRL+V ESC (this means press CONTROL and V key together then press ESCAPE key). Tested on Vi IMproved 7.0

Categories
blog howto network

Netscreen policy based routing cross virtual router

EDIT: Also read the comments, before implementing.

For a customer at work i was implementing PBR on his Netscreen NS25. Normally you have just 1 virtual router called trust-vr, which contains your trust and untrust interfaces. Inside this trust-vr you then have a routing table with a 0.0.0.0/0 route towards your ISP gateway. My customer had a second ISP connection in place to offload some of the traffic trough this connection. I connected the 2nd ISP to an unused interface and placed it in the “trust-vr” virtual router.
Problem: My new interface was not static, but PPoE (same like DHCP) and thus get it’s IP address automatically. However also the gateway is automatically received and set in the virtual router. Unfortunately automatically received gateway is set as connected type with a higher priority then any statically set default gateway. This means i got a second entry for 0.0.0.0/0 with ISP2 gateway and higher priority (thus making it the default), and all traffic went over this 2nd ISP instead of the 1st. This was not desired.

What to do ?
Make a new virtual router, for example call it “ISP2-vr” and a new zone “ISP2”. Assign your interface with the ISP2 connection to zone “ISP2” and to virtual router “ISP2-vr”. This means your automatically received default gateway is placed in the routing table of “ISP2-vr” and nothing get’s messed up.

Redirect traffic.
To redirect the desired traffic, in my case http & https, i use PBR (Policy based routing). Note the PBR should be created inside “trust-vr” virtual router, because there the traffic is originating. First we create an extended ACL. Give the ACL a number, for example 10 and assign a sequence (example number 1). In this sequence you provide the requirements. Let’s say all trafic to port 80 (http) should be redirected, then you just choose port 80, protocol TCP and leave the rest blank. Next you create a match group what basically is just an ID and name where you can assign multiple ACL’s to. Next you make an action group, where you can define an action. Now this action should be next-hop ISP2gatewayIP (this is important !) and not contain an interface. The reason is that the interface is not known to “trust-vr” virtual router so it won’t work. Combine it all in a PBR policy and assign the policy to the trust-vr.

For the next-hop action to work we need to do some tricks. First of all inside the routing table for “ISP2-vr” you need to create route like this: ISP2-gateway/32 to ISP2-gateway/32 interfaceX. Don’t ask me why but this is needed for the PBR and explained in a Juniper KB.

Now normally this should do it. But in my case my ISP2-gateway IP was not inside the ISP2-ip and subnetmask. This appears strange but is mostly the case when using PPoE. To get around this, i need to add a route in the “trust-vr” virtual router for ISP2-gatewayIP to “ISP2-vr” virtual router. That’s it PBR is operational.

You should create a policy from “Trust” zone to “ISP2” zone and allow traffic AND important enable SOURCE NAT on this policy, because your NAT set on the Trust interface won’t work because you are not routing to Untrust.

In this CLI example ethernet1 is the Trust interface, ethernet3 is the Untrust interface and ethernet4 is my ISP2.

set vrouter "trust-vr"
set source-routing enable
set sibr-routing enable
unset add-default-route
set route 0.0.0.0/0 interface ethernet3 gateway 81.246.22.xx
set route 212.71.0.yy gateway ISP2-vr
set access-list extended 20 dst-port 80-80 protocol tcp entry 1
set match-group name port80
set match-group port80 ext-acl 20 match-entry 10
set action-group name toISP2
set action-group toISP2 next-hop 212.71.0.yy action-entry 2
set pbr policy name PBRport80
set pbr policy PBRport80 match-group port80 action-group toISP2 1
exit
set vrouter "ISP2-VR"
set source-routing enable
set sibr-routing enable
set route 212.71.0.yy/32 interface ethernet4 gateway 212.71.0.yy
exit
set interface ethernet1 pbr PBRport80

Categories
blog linux

Munin config example

/etc/munin.conf

# Example configuration file for Munin, generated by ‘make build’
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin

# Where to look for the HTML templates
tmpldir /etc/munin/templates

# Make graphs show values per minute instead of per second
#graph_period minute

# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)

contact.yourname.command mail -s “MUNIN – [${var:host}] ~ ${var:graph_title} ~ warnings: ${loop<,>:wfields ${var:label}=${var:value}} ~ criticals: ${loop<,>:cfields ${var:label}=${var:value}}” your.email@domain.tld

#
#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg

# a simple host tree
[location1-wms1.otherdomain.tld]
address 169.254.30.86
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
# memory.committed.warn 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location1-wms2.otherdomain.tld]
address 169.254.30.88
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location1-ts1.otherdomain.tld]
address 169.254.30.90
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1m-fc1.otherdomain.tld]
address 169.254.30.94
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1-mfc2.otherdomain.tld]
address 169.254.30.96
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1-ts2.otherdomain.tld]
address 169.254.30.92
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used
memory.apps.label usage
memory.unused.label pagefile

[location2-wms1.otherdomain.tld]
address 169.254.20.20
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location2-wms2.otherdomain.tld]
address 169.254.20.22
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location2-ts1.otherdomain.tld]
address 169.254.20.24
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-ts2.otherdomain.tld]
address 169.254.20.26
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-mfc1.otherdomain.tld]
address 169.254.20.28
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-mfc2.otherdomain.tld]
address 169.254.20.30
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[otherdomain.tld;Totals]
update no

load1.graph_title Loads-WMS1
load1.graph_order location1wms1=location1wms1.otherdomain.tld:load.load location2-wms1=location2-wms1.otherdomain.tld:load.load

load2.graph_title Loads-WMS2
load2.graph_order location1wms2=location1wms2.otherdomain.tld:load.load location2-wms2=location2-wms2.otherdomain.tld:load.load

load3.graph_title Loads on top of each other
load3.dummy_field.stack location1wms1=location1wms1.otherdomain.tld:load.load location2-wms1=location2-wms1.otherdomain.tld:load.load location1wms2=location1wms2.otherdomain.tld:load.load location2-wms2=location2-wms2.otherdomain.tld:load.load
load3.dummy_field.draw AREA # We want area instead the default LINE2.
load3.dummy_field.label dummy # This is needed. Silly, really.

memory1.graph_title Memory SWAP WMS
memory1.graph_order location1wms1=location1wms1.otherdomain.tld:memory.swap location2-wms1=location2-wms1.otherdomain.tld:memory.swap location1wms2=location1wms2.otherdomain.tld:memory.swap location2-wms2=location2-wms2.otherdomain.tld:memory.swap

memory2.graph_title Memory Committed WMS
memory2.graph_order location1wms1=location1wms1.otherdomain.tld:memory.committed location2-wms1=location2-wms1.otherdomain.tld:memory.committed location1wms2=location1wms2.otherdomain.tld:memory.committed location2-wms2=location2-wms2.otherdomain.tld:memory.committed

# load3.graph_title Loads summarised
# load3.combined_loads.sum location1wms1.otherdomain.tld:load.load location2-wms1.otherdomain.tld:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!

[ip-wms1.domain.tld]
address 127.0.0.1
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

[ip-wms2.domain.tld]
address 192.168.101.51
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

[windows-pc.domain.tld]
address 192.168.101.26
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

/etc/munin-node.conf

#
# Example config-file for munin-node
#

log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

# Which port to bind to;
host *
user root
group root
setsid yes

# Regexps for files to ignore

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

# Set this if the client doesn’t report the correct hostname when
# telnetting to localhost, port 4949
#
host_name location1-wms1.otherdomain.tld

# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn’t understand CIDR-style network notation. You may repeat
# the allow line as many times as you’d like

#allow ^127\.0\.0\.1$
allow ^169\.254\.25\.10$

Happy learning !

Categories
howto

McAfee EPO agent uninstall

Hoe de McAfee EPO agent uninstalleren ?
Ga naar ‘Start – Uitvoeren’ tik in ‘CMD’ (zonder quotes) en druk op OK.
In het zwarte kader tik je na de cursor:

cd “c:\Program Files\Network Associates\Common Framework\”

Of indien niet succesvol probeer deze,

cd “c:\Program Files\McAfee\Common Framework\”

Tik daarna:

frminst /remove=agent

Categories
howto

IT FAQ – Veel gestelde vragen over windows en co.

  1. Ik zie geen extra station in verkenner als ik een USB disk of extra apparaat aansluit ?
    Windows 2000 & XP bevatten een vervelende bug die ervoor zorgt dat windows bij het toewijzen van een schijf letter aan een nieuw apparaat niet controleert als die schijf letter niet gebruikt wordt door een netwerk koppeling. Maak je dus bvb op een computer met harde schijf C: en cd-rom D: een netwerk koppeling aan met letter E:, dan zal je indien je daarna een USB stick aansluit geen extra schijf zien staan. Wanneer je dan E: wil verkennen kan of de netwerk koppeling of de inhoud van de stick zien.

    Voorkomen: Gebruik enkel letters verder in het alfabet voor netwerk koppelingen, en laat de eerst volgende vrije letetrs (bvb E, F, G) altijd vrij voor extra apparaten.

    Oplossing: Als je toch met zo’n geval zit, kan je via schijfbeheer de letter manueel gaan aanpassen. Klik rechts op deze computer en kies beheren in het menu. Links kies je in het menu voor schijfbeheer. Hier kan je de letter van je USB stick of apparaat aanpassen. Andere mogelijkheid is de letter van je netwerk koppeling veranderen.

  2. Outlook XP(2002) en 2003 kan geen enkele bijlage meer openen ?
    Symptomen: U krijgt een boodschap in de aard van “Can’t create file: … Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder” of in het nederlands: “Kan bestand: … niet openen (schrijven) …. controleer de permissies van de map …”.

    Oplossing: Maak de tijdelijke bestanden folder van outlook leeg. Waar deze zich bevindt kun je opzoeken in het register. Open regedit, selecteer HKEY_LOCAL_MACHINE en kies in het menu bewerken voor zoeken. Als zoekterm geef je op “OutlookSecureTempFolder” (zonder quotes). Open de gevonden registersleutel en de inhoud ervan is de locatie van de tijdelijke bestanden map. Hoogstwaarschijnlijk staat hier deze locatie: “C:\Documents and Settings\%USERNAME%\Local Settings\Temporary Internet Files\OLK??” (?? zijn willekeurige nummers). Wis de inhoud van deze map en zorg dat de permissies goed staan zodat je bestanden kan aanmaken in deze map.

  3. Onder constructie …