SETTING UP A LAN NETWORK
In this module, we have created a Local Area Network.
Toolkit Used:
Workstation Operating System
|
Lubuntu 15.04
|
||||||
External Network Interface Cards
|
|
||||||
Switches
|
|
Below are the steps followed while setting up a LAN.
1. Install DHCP Server:
Installedisc-dhcp-server to maintain server setup and configuration.
$ sudo apt-get install isc-dhcp-server.
2. Install webmin:
Installed
webmin to configure and maintain theDHCP server.
a.
Installed required dependencies:
$ sudo apt-get install perl
libnet-ssleay-perl libauthen-pam-perl libpam-runtime openssllibio-pty-perl
apt-show-versions python.
b.
Downloaded
Webmin:
$ wget http://prdownloads.sourceforge.net/webadmin/webmin_1.770_all.deb
c.
Installed Webmin:
$ sudo dpkg
--install webmin_1.770_all.deb
3. Renaming Network Cards
In the current workstation, eth1 is
connected to the MSIT LANand eth0 is the external NIC which is going to be used
for setting up a LAN for IS specialization purposes. So, for the better
understanding and avoidconfusion, we have renamed eth1 to WAN and eth0 to LAN.
$ sudo leafpad
/etc/udev/rules.d/70-persistent-net.rules
4. DHCP & LAN Configuration
I.
Editing
Network Interfaces:
Edited the network
interfaces in order to configure the eth0
$ sudo leafpad /etc/network/interfaces
II.
Check
IP Configuration
Check the IP Configuration
of both LAN and WAN after editing
interfaces.
$ sudo ifconfig
III.
Listen
for DHCP request
$ sudo leafpad /etc/default/isc-dhcp-server.
IV.
Configure
the DHCP server’s config file
Edit the
dhcp.conf file in order to make changes according to our convenience.
$ sudo nano /etc/dhcp/dhcpd.conf
V.
Enable
IP Forwarding
Edit the sysctl.conf file to
forward packets from WAN to LAN.
Uncomment IPV4 packet forwarding
line.
$ sudo nano /etc/sysctl.conf
VI.
Login
to Webmin
After configuring all our
requirements, login to webmin (https://localhost:10000/)
using root account.
VII.
Add
Firewall Rules
a. Enable MASQUERADE(NAT):
·
Select Networking in the left menu bar.
·
Select the Linux firewall from the Networking
drop down menu.
·
Configure the Linux Firewall such that it should
do the network address translation for WAN interface.
·
So, select “Do network address translation on
external interface” for WAN.
·
Select the “Setup firewall” finally.
b. Save IP Table rules
After the above step, save the
rules to iptables.up.rules file by clicking on ‘Apply changes’ in IP Tables.
c. Observe IP Table Changes
Observe the changes made to the
iptables.up.rules result in modification of /etc/network/interfaces file
d. Activate Network Interfaces
Make sure that both LAN and WAN is
up and running. If in case anyone of the interfaces is down, activate it before
proceeding.
VIII.
Listen
to WAN Interface
IX.
Start
the DHCP Server
5. Results:
Three personal workstations are
connected to the switch which is connected the DHCP Server. The DHCP server
automatically allocates IP Addresses to them.
IP address
|
WorkStation
Name
|
192.168.0.11
|
Kittu
|
192.168.0.12
|
H3M4
|
192.168.0.13
|
HR
|
Details can be observed in the
screenshot.
It is the
result of system log file (/var/log/syslog).
$ sudo tail -50 /var/log/syslog
No comments:
Post a Comment