Changes

Jump to: navigation, search

OPS235 Lab 6

662 bytes removed, 15:35, 27 June 2016
no edit summary
===Purpose / Objectives of Lab 6===
In this lab, you will learn the basics of networking by using your '''Virtual Machines''' and your '''c7host''' machine. You will first set up a '''virtual private network (VPN)''' among those machines. In addition, you will learn to set up '''network names''' (to associate with server's IP Addresses), '''associate network services with port numbers''' for troubleshooting purposes, and setup '''firewall policies''' via the '''iptables''' command.
<u>Main Objectives</u>
=INVESTIGATION 1: CONFIGURING A VIRTUAL PRIVATE NETWORK (VPN)=
For the remainder of this course, we will focus on networking involving our VMs and our c7host machine. This lab will focus on setting up a virtual private network ('''VPN'''), connecting our VMs and c7host machine to the VPN, and configuring our VPN to make more convenient to use, troubleshoot and protect. '''Lab 7''' will focus on configuring SSH and making access to the VPN more secure. Finally, '''lab 8''' will focus on configuring the network for fixed workstations, mobile (as well as wired devices, or both at the same time) via DHCP to automatically assign an IP address.
There are several reasons for creating '''VPNs'''. The main reason is to '''safely connect servers together''' (i.e. to safely limit but allow share information among computer network users). This allows for a secure connection of computers yet controlling access to and monitoring (protecting) access to permitted users (discussed later in '''lab7''').
'''Perform the following steps:'''
# Launch your '''c7host VM ''' and start the Virtual Machine Manager.# Make certain that the centos1, centos2, and centos3 virtual machines are '''<u>powered off</u>'''.
# In the Virtual Machine Manager dialog box, Select '''Edit'''-> '''Connection Details'''.
# In the '''Connection Details''' dialog box, select the '''Virtual Networks''' tab
# Click to deselect <u>de-select</u> the '''Autostart (on boot)''' check-box options and click the '''Apply''' button.
# Then stop the default network configuration by clicking on the '''stop''' button at the bottom left-side of the dialog box.
# Click the '''add''' button (the button resembles a "plus sign") to add a new network configuration.
# In the next screen, enter the '''new network IP address space''' called: '''192.168.235.0/24'''
# Disable the DHCP4 check box and click the '''Forward''' button.
# Click the '''Forward ''' button again to accept the default in the next screen.
# Enable Network Forwarding by Selecting '''Forwarding to physical network''', the destination should be '''Any physical device''' and the mode should be '''NAT'''
# Proceed with changes, and click '''Finish'''.
# On your '''c7host''' machine, run <b>ifconfig</b> and make note of the IP address assigned to the '''virbr1''' (i.e. "Virtual Bridge) interface. This will be the default gateway and DNS server for your VMs.
# Start Select the Console view (instead of Details), start your '''centos1''' VM and login.# Within your '''centos1 VM''', click '''Applications''' menu, then select '''System Tools''', and then '''Settings'''.
# In the ''Settings'' Dialog Box, click on the '''Network''' icon.
# For the '''Wired''' connection, click the '''settings''' button (The <u>icon</u> appears as a <u>gear</u> located at the bottom right-hand corner of the dialog box).
# Open a terminal and issue the '''ifconfig''' command to confirm the IP ADDRESS settings change.
# Verify that '''centos1'''VM is now connected to the VPN by issuing the following command from your '''c7host''' machine:<br><b><code><span style="color:#3366CC;font-size:1.2em;">ping 192.168.235.11</span></code></b>
# Switch to your '''centos2''' VM.
# Run the network configuration tool and enter the following static configuration for your '''centos2''' VM:
#* IP Address: '''192.168.235.12'''
#* Subnetmask: '''255.255.255.0'''
#* Default Gateway: '''192.168.235.1'''
#* DNS Server: '''192.168.235.1'''
# When finished, click '''Apply''' and close the network dialog box.
# Issue the ifconfig eth0 command to verify your new settings.
# Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">ping 192.168.235.1</span></code></b> to confirm that you can connect to your '''c7host''' VM.
# Switch to your c7host VM, and issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">ping 192.168.235.11</span></code></b> to confirm that you can connect to your '''centos1''' VM.
[[Image:network-scripts.png|thumb|right|250px|Although you can use the '''ifconfig''' command to temporarily create a static IP address connection to a network, you need to add the network settings in the '''/etc/sysconfig/network-scripts''' directory to automatically connect to the network upon Linux system boot-up.]]
=== Part 3: Configuring VM Network Setup via Command Line ('''centos3''' and '''centos2''') ===
The centos3 and centos2 VMs are '''text-based only''' systems, thus we cannot use a graphical tool to configure centos3 to connect to our private network. Therefore we will learn how to perform this task by using command-line tools.
13,420
edits

Navigation menu