Showing posts with label vm. Show all posts
Showing posts with label vm. Show all posts

Faking Services using Netcat (For Testing Nagios)

Tags: February 3, 2014 4:41 AM
0 comments

Simulating the health of services can be pain if we should install and turn them on/off the real services such HTTP Server, SSH Server, FTP, etc one-by-one on each VM. In this experiment I just faking 2 services which are: HTTP and SSH. Based on this simple topology we would end up with:

Services which Monitored

  • VM 1
    • HTTP
    • PING
  • VM 2
    • HTTP (Simulate the Always 404 Error)
    • PING
  • VM 3
    • HTTP
    • PING
    • SSH

Share on Facebook Twitter

Connecting Two Subnet inside VMs in Linux

Tags: February 2, 2014 2:51 PM
0 comments

This should be applicable to real world (physical devices) not just virtualized environment. The topology is simple:

                 +----------------------------+
                 |          The Host          |
                 |          --------          |
                 |           Router           |
                 +----------------------------+
                       |               |
                    +-----+         +-----+
        192.168.1.1 | br0 |         | br1 | 192.168.1.9
                    +-----+         +-----+
                       |               |
  Mask: 192.168.1.0/29 |               | Mask: 192.168.1.8/29
        +--------------+               +----------+
        |              |                          |
        |              |                          |
 +--------------+      |                   +---------------+
 |     VM 1     |      +----+              |    VM 3       |
 | 192.168.1.2  |           |              | 192.168.1.10  |
 +--------------+           |              +---------------+
                    +--------------+
                    |     VM 2     |
                    | 192.168.1.3  |
                    +--------------+

The Details

The goal is to connecting VM in different subnet so they can talk to each other. Btw, I'm using Virtualbox for this playground. Here's the breakdown from the schema above:
  • The Host had two interface br0 and br1 (Both are virtual)
  • The schema using two subnet 192.168.1.0/29 and 192.168.1.8/29
  • The Host had two bridge interfaces and three TAP interfaces (for each VMs)
  • tap0 for VM 1, tap1 for VM 2 and tap2 for VM 3
  • tap0 and tap1 attached to br0 and tap2 attached to br1

Share on Facebook Twitter