Welcome to the Linux Server Project! In this project, we aim to set up a variety of network services on a Linux-based server, including DHCP, DNS, Web Server (Nginx), Cron jobs, and SSH. The goal is to provide a fully functional server environment where all these services work in harmony to support a small-scale network.
In this project, we set up and configured multiple network services on a Linux server, including:
- DHCP Server for dynamic IP address allocation
- DNS Server for local name resolution
- Web Server (Nginx) to serve web pages
- Cron Jobs for scheduling tasks
- SSH Server for secure remote login
The project also involves troubleshooting and configuring these services, ensuring that they work properly, and learning the intricacies of Linux system administration.
The project simulates a server environment in a NAT network where we configure DHCP, DNS, Web server (Nginx), SSH, and Cron jobs. The project is designed to demonstrate how to efficiently configure these services on a Linux machine to handle typical network and administrative tasks.
IP Table
Device | IP Address |
---|---|
Server (DHCP/DNS) | 10.0.2.15/24 |
Client | DHCP Assigned |
- Linux Server: Configured with multiple network services.
- Client Machine: Configured to receive IP dynamically via DHCP.
- Service: The DHCP server was configured to assign dynamic IP addresses to clients on the local network.
- Service: The DNS server (BIND9) was configured to resolve local domain names (
library.local
) to IP addresses.
- Service: The Nginx web server was set up to serve static pages and allow remote access via HTTP.
- Service: Cron jobs were used to automate scheduled tasks on the server.
- Service: SSH (Secure Shell) was configured to allow remote connections to the server.
- DHCP Server assigns dynamic IP addresses to client devices, allowing them to communicate on the local network.
- DNS Server resolves domain names (e.g.,
library.local
) to IP addresses for clients and other network devices. - Web Server (Nginx) provides HTTP services, allowing users to access a basic web page hosted on the server.
- Cron Jobs automate tasks like backups or system maintenance to run at scheduled intervals.
- SSH allows secure remote login, enabling administration and troubleshooting of the server from anywhere in the network.
-
DHCP Server Misconfiguration:
- The DHCP service was initially not assigning IP addresses correctly due to misconfiguration in
/etc/dhcp/dhcpd.conf
and the DHCP daemon not being properly restarted. Thedhcpd.leases
file was checked to confirm if leases were being assigned.
- The DHCP service was initially not assigning IP addresses correctly due to misconfiguration in
-
DNS Resolution Issues:
- DNS queries were timing out because the DNS server (BIND) was not properly listening on the correct IP interfaces. The server was configured to listen on
10.0.2.15
, but DNS queries were not being routed correctly. This required ensuring that the BIND service was configured to listen on the correct network interface.
- DNS queries were timing out because the DNS server (BIND) was not properly listening on the correct IP interfaces. The server was configured to listen on
-
Firewall Blockages:
- The firewall was blocking essential ports (e.g., HTTP, DNS, SSH) during testing. This was resolved by temporarily disabling the firewall to confirm that the services were functioning properly.
-
Network Configuration Challenges:
- The project involved troubleshooting network configurations, including ensuring that the client VM could communicate with the server through NAT and that proper DNS resolution was functioning.
-
Service Restarts:
- Ensuring services (e.g.,
named
,dhcpd
,nginx
) were properly restarted after configuration changes was a recurring challenge that required close attention to service status.
- Ensuring services (e.g.,
-
Clone the Repository:
- Download or clone this repository to your local machine.
-
Server Configuration:
- Follow the instructions to configure the DHCP, DNS, Web Server, SSH, and Cron services on your Linux server.
-
Verify Connectivity:
- Use
ping
,dig
,curl
, andssh
to verify that the services are functioning:- Test DHCP by checking that the client receives an IP.
- Test DNS by resolving domain names with
dig @localhost library.local
. - Test Web Server by accessing
http://<server-ip>
from a browser. - Test SSH by connecting remotely using
ssh user@<server-ip>
.
- Use
-
Test Cron Jobs:
- Check that automated tasks run correctly according to the cron schedule.
- Name - put the damn roles
- Stephane Paris - Configuration & Documention
- Scalability: The project could be expanded to support more clients, additional network services, or more complex network configurations.
- Security Enhancements: Add advanced firewall configurations, IPsec, or VPN to secure communication across the network.
- Monitoring: Integrate monitoring tools (e.g., Nagios, Zabbix) to track the health of the server and network services.
- Backup Solutions: Automate backups with cron jobs and implement a robust backup system for critical data.