April 22, 2014

How To Install and Configure SAMBA Server on RHEL 6

Installation

Configuration

The default configuration works just fine.

Security

Having 'security = user' means we need a UNIX account. Lets create one.

And set samba password for account.

Firewall

Test

Now lets test it from a remote client. First lets list all shares on host.

And to mount it.

Finally lets test to write to winuser1 home directory.

This did not go well. The missing configuration is SELinux.

SELinux

On the SAMBA server, run the following command, if you want to share home directories via samba.

Now lets get back to client and un mount and the remount and write and read and that should be successful.

Different Way to Mount NFS in RHEL6

Automounting

The below will auto mount the user 'ldapuser1' home directory with rw permission on nfs.server.com.

Manual

You can manually mount a nfs exported directory to a local directory /remote.

Mount at boot

How to Install and Configure NFS Sharing on RHEL 6

Installation

To get nfs to work we need to install and start rpcbind and nfslock. Double check that is done.

Now we are ready to start NFS.

Finally lets test our new NFS server.

This will return a empty export list, without error.

Firewall

To be able to access NFS exports remotely, we need to open certain ports in the firewall. To investigate which one, we use the command rpcinfo.

This will return quite some ports. To lock down which port that are used please uncomment all ports in NFS conf file.

Now restart NFS service and lets start open ports.

And after opening all ports the iptables should look like.

Test your new firewall configuration by from remote client execute command.

Configuration

After we have successfully configured the firewall, lets back to our server and configure NFS export directories. We start with creating a new directory, that we will exports.

Now configure NFS to export it.

To apply the new changes run

And to list current exports

Test

From a second machine on the same LAN, test connectivity to NFS server (192.168.1.15).

The simplest way to test read and write is to use the automounting functionality.

April 21, 2014

How to Install Chrome on Ubuntu 14.04 LTS (Trusty)

Open a Terminal and run the commands.

Add the public key for the Google repo.

Add the Google repo for the chome package.

Update and install chrome web browser.

April 14, 2014

How To Configure KVM Virtual Machine Network

Background

Here I will configure a KVM host with virtual machines to be accessible from a local network.

This can be achieved in two ways by configure on KVM host machine:

  • A network bridge
  • Configure iptables as a router, which will forward traffic to virtual machines.

The easiest way is to use a network bridge, since then both desktop and virtual machines will be on the same subnet.

Prerequisite

Here we will configure the KVM host machine network configuration, manually, so we start by disable the NetworkManager

KVM Host Network Bridge Configuration

/etc/sysconfig/network-scripts/ifcfg-eth0

Above we have disabled NetworkManager (NM_CONTROLLED=no) and is using a Bridge.

/etc/sysconfig/network-scripts/ifcfg-br0

Above have we configured a static IP (BOOTPROTO=none) and assigned IP, Gateway and DNS.

KVM Host iptables

Since we are not using the second alternative with routing, the KVM host machines iptables configuration is the same as default.

After editing/creating files you might need to restore SELinux security contexts.

And finally restart network on KVM host

Virtual Macines Network Configuration

The last part is to configure the virtual machine network. This is easiest achieved with the virt-manager.

For an existing virtual machine.

And for a new.

Inside the Virtual Machine

Inside the virtual machine you can configure either a static IP or a dynamic one. The easiest way is to use the tool system-config-network-tui.

Test

And finally test to ping the virtual machine (virtual1) from the desktop.

Reference