Archive for 'Systems Administration'

Substitute the minor revision number of the latest Linux 4.19 kernel for every "XX" below.

Please note that I've disabled UEFI in the BIOS since I don't use it.

1] In my Slackware64 14.2, the only disk sets I do not install are E, F, KDEI, T, and Y.
2] Update Slackware64 14.2 first.

su - # Or login as root.
cd /etc/slackpkg
cp -p mirrors mirrors.orig
vi mirrors # Enable a mirror.
slackpkg update
slackpkg upgrade-all
shutdown -r now

3] Do the following to compile the latest Linux 4.19 kernel:

su - # Or login as root.
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.XX.tar.xz
wget http://ftp.slackware.com/pub/slackware/slackware64-current/kernels/huge.s/config
cd /usr/src
tar xJpf ~/linux-4.19.XX.tar.xz
rm linux
ln -s /usr/src/linux-4.19.XX linux
cd linux
make mrproper
mv ~/config .config
make oldconfig # When asked for input, use the default or the option you think is best.
make menuconfig # You may skip this. Do this only if you need to make configuration changes.
make bzImage
make modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-huge-4.19.XX
cp System.map /boot/System.map-huge-4.19.XX
cp .config /boot/config-huge-4.19.XX
cd /boot
rm System.map
ln -s System.map-huge-4.19.XX System.map
rm config
ln -s config-huge-4.19.XX config
rm vmlinuz
ln -s vmlinuz-huge-4.19.XX vmlinuz
/sbin/lilo

4] Congratulations. Your Linux 4.19 kernel should now work after a reboot.

1) Install a minimal 64-bit Debian 9 Stretch. Create a regular user "toor".
2) # Make sure CD-ROM is commented out in "/etc/apt/sources.list", and that you have configured an official Debian mirror there. Also make sure "contrib" is configured to your Debian mirror. As root:
apt-get -y update
apt-get -y upgrade
apt-get -y install net-tools openssh-server openssh-client
3) cp -p /etc/network/interfaces /etc/network/interfaces.orig
vi /etc/network/interfaces # Have the following contents. You may modify the contents if necessary.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp3s0
#iface enp3s0 inet dhcp
› Continue reading...

Note 1: It is assumed that the IP of your Debian 9.4 64-bit KVM server is 192.168.1.160. Change this if necessary.
Note 2: It is assumed that the gateway IP of your Debian 9.4 64-bit KVM server is 192.168.1.1. Change this if necessary.
Note 3: It is assumed that the broadcast IP of your Debian 9.4 64-bit KVM server is 192.168.1.255. Change this if necessary.

Setup server for remote access:
1) Install minimal Debian 9.4.0 64-bit. Create a regular user "toor".
2) Remove installation media.
3) # Make sure CD-ROM is commented out in "/etc/apt/sources.list", and that you have configured an official Debian mirror there. Also make sure "contrib" is configured to your Debian mirror.
apt-get -y update
apt-get -y upgrade
apt-get -y install net-tools openssh-server openssh-client
4) vi /etc/network/interfaces # Have the following contents. You may modify the contents if necessary.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp3s0
› Continue reading...

Setup Cisco RV325 for Cisco Easy VPN client and Shrewsoft VPN client (full VPN)
# Source: https://supportforums.cisco.com/video/12300166/rv320-and-rv325-ipsec-vpn-client-configuration
1) Login to router.
2) Click "VPN".
3) Click "Client to Gateway".
4) Tick "Easy VPN".
5) Set "Tunnel Name" to "fullvpn". This is also your group name.
6) Disable "Minimum Password Complexity".
7) Set "Password" to a desired password (for this documentation, it is "DoNotUseThisExample". PLEASE USE YOUR OWN DIFFERENT PASSWORD!).
8) Set "Interface" to "WAN1". We'll use WAN1 for VPN access here.
9) Make sure "Enable" is ticked.
10) Set "Tunnel Mode" to "Full Tunnel"
11) "IP Address" should be "192.168.1.0". If you use a different value from the default 192.168.1.0, please use it instead.
12) "Subnet Mask" should be "255.255.255.0".
13) "Extended Authentication" should be "Default - Local Database".
14) Click "Save".

Create an user on Cisco RV325 for Cisco Easy VPN
# Source: https://supportforums.cisco.com/video/12300166/rv320-and-rv325-ipsec-vpn-client-configuration
› Continue reading...

Make build system and compile Squid 3.5
1) Install Debian 9 (amd64) from net install ISO. Make a minimal installation.
2) apt-get -y update ; apt-get -y upgrade ; apt-get -y install openssh-server net-tools
3) apt-get -y install openssl devscripts build-essential fakeroot libdbi-perl libssl1.0-dev
4) cd ~ ; apt-get source -y squid3 # You may ignore the following warning: W: Download is performed unsandboxed as root as file 'squid3_3.5.23-5+deb9u1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
5) apt-get build-dep -y squid3
6) cd squid3-3.5.23
7) vi debian/rules # Make sure the following is defined in the end for "DEB_CONFIGURE_EXTRA_FLAGS":
--with-default-user=proxy \
--enable-ssl \
--enable-ssl-crtd \
--with-openssl \
--disable-ipv6
8) debuild -us -uc # .deb packages will be in ~/

Installation of .deb packages
*) If target machine is different from where you built Squid, install Debian 9 (amd64) from net install ISO. Make a minimal installation.
1) apt-get -y install logrotate net-tools firewalld openssh-server apache2-utils openssl libdbi-perl devscripts
› Continue reading...

Please note that I've disabled UEFI in the BIOS since I don't use it.

1] In my Slackware64 14.2, the only disk sets I do not install are E, F, KDEI, T, and Y.
2] Update Slackware64 14.2 first.

su - # Or login as root.
cd /etc/slackpkg
cp -p mirrors mirrors.orig
vi mirrors # Enable a mirror.
slackpkg update
slackpkg upgrade-all
shutdown -r now

3] Do the following to compile the Linux 4.14.86 kernel:

su - # Or login as root.
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.86.tar.xz
wget http://slackmirror.cbpf.br/pub/slackware/slackware64-current/source/k/kernel-configs/config-huge-4.14.78.x64
cd /usr/src
tar xJpf ~/linux-4.14.86.tar.xz
rm linux
ln -s /usr/src/linux-4.14.86 linux
cd linux
make mrproper
mv ~/config-huge-4.14.78.x64 .config
make oldconfig # When asked for input, use the default or the option you think is best.
make menuconfig # You may skip this. Do this only if you need to make configuration changes.
make bzImage
make modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-huge-4.14.86
cp System.map /boot/System.map-huge-4.14.86
cp .config /boot/config-huge-4.14.86
cd /boot
rm System.map
ln -s System.map-huge-4.14.86 System.map
rm config
ln -s config-huge-4.14.86 config
rm vmlinuz
ln -s vmlinuz-huge-4.14.86 vmlinuz
/sbin/lilo

4] Congratulations. Your Linux 4.14.86 kernel should now work after a reboot.

1] I used a minimal CentOS 6.5 64-bit installation for this blog post. I've tested this documentation on a VPS and a dedicated server.
2] Login as root in your CentOS installation.
3] "yum install gcc wget"
4] "wget http://www.malaya-digital.org/portsentry-1.2.tar.gz"
5] "tar xzf portsentry-1.2.tar.gz"
6] "cd portsentry_beta"
› Continue reading...

« Previous posts Back to top