Getting the network to work in a VirtualBox VM with CentOS6

For some reason the network card for eth0 is not automagically detected by VirtualBox VM when installing a CentOS6. ( On VirtualBox running in Ubuntu 12.10 )

After some googling I found many different solutions of which none worked.
First things first: set the network interface in VirtualBox to be the PCnet-FAST III (Am79C973) networkcard. Usually I set this attached to NAT, but this does not seem to work. Attaching the adapter to one of my Ubuntu’s network interface cards by setting it to Bridged Adapter.

Restart the network service in the VM. Still no network. Only after some manual configuration in ‘/etc/sysconfig/network-scripts/ifcfg-eth0’ I got it to work. (it the ifcfg-eth0 file does not exist, create it.)

After trying out different configurations found on the net, I shuffled a bit with the possible config options and this got it to work:

DEVICE="eth0"
HWADDR=08:00:27:D0:F7:95
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="dhcp"
TYPE=Ethernet
IPV6INIT=no
PEERDNS=yes

Restart network service and go do some fun magic in your VM.

Note: don’t forget to change the HWADDR with the address of the network card from the virtualbox configuration!

What to do after Fortinet VPNClient Crash in Ubuntu

At work they are using ForitGate VPN. To be able to work from home I have to use the FortiNetSSLVpnClient. It seems FortiGate is not compatible with any existing other VPN Clients. The forticlient some times crashes and this seem to result in routes not being cleaned up as it should be.

When I am in the office my Ubuntu 12.10 thinks I’m still using VPN and tries to tunnel the connections through the forticlient, which is not running of course. The result is that I get failures for connecting to certain internal domains and servers.

Ping to the servers doens’t work. That gives DNS Lookup failures but performing dnslookup works.

The fix! Flush the dns’s using

sudo /etc/init.d/dns-clean

Update:
Also check that the DNS entries in /etc/resolve.conf are correct. It is possible that the fortinet client did not clean it up as it should be.

git-svn with multiple svn repositories

At a customer they are switching the control of the svn server to another department. To make sure the new server works like it should, we’re running a trail period.

The project I’m working on was chosen as the trail project. This means I have to┬ásynchronize both repositories. Luckily I’m using git-svn instead of pure svn. (IMHO the new server should have been git! Not oldschool svn).

Thanks to git I’m able to commit to both repositories from the same physical project on my disk. This wouldn’t be possible with only svn. It would be hell.

How did I set it up? Continue reading “git-svn with multiple svn repositories”