Linux

Posted by support | General | Wednesday 9 January 2008 8:55 am

DHCP for Linux (From Red Hat 5)

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample 
#
ddns-update-style interim;                                # Required for dhcp 3.0+ / Red Hat 8.0+
ignore client-updates;
# VPNSubnet-Shared
shared-network VPN-SubNet {
 # VPN-Subnet
 subnet 10.0.0.0 netmask 255.255.255.0 {
  option domain-name-servers 10.0.0.50 , 10.0.0.60;
  option routers 10.0.0.1;
  authoritative;
  range 10.0.0.85 10.0.0.90;
  }
 }

 

Some Linux Tweaks that may help when building a new server.

/etc/rc.local file
This file if edited will show on the console when the last reboot happen.

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

!!!start here!!
echo “Welcome to \n” > /etc/issue
echo “All access to this system is monitored” >> /etc/issue
echo “Unauthorized access is prohibited” >> /etc/issue
echo “Last reboot completed at $(/bin/date)” >> /etc/issue
echo “This server belongs to Company Name” >> /etc/issue
echo “address” >> /etc/issue
echo city, state zip” >> /etc/issue
echo “phone >> /etc/issue
echo >> /etc/issue

**************************************************************************

This edit will save embarrassment

/etc/inittab

#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
# 0 – halt (Do NOT set initdefault to this)
# 1 – Single user mode
# 2 – Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 – Full multiuser mode
# 4 – unused
# 5 – X11
# 6 – reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
# ca::ctrlaltdel:/sbin/shutdown -t3 -r now (comment this line out and then reboot)

Now, when someone hits ctrl alt del the server will not reboot.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.